mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Handle recipient modification callbacks on main thread
// FREEBIE
This commit is contained in:
parent
989ea4042c
commit
afed60f870
@ -42,6 +42,7 @@ import org.thoughtcrime.securesms.util.DateUtils;
|
||||
import org.thoughtcrime.securesms.util.DynamicLanguage;
|
||||
import org.thoughtcrime.securesms.util.SaveAttachmentTask;
|
||||
import org.thoughtcrime.securesms.util.SaveAttachmentTask.Attachment;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.video.VideoPlayer;
|
||||
|
||||
import java.io.IOException;
|
||||
@ -98,7 +99,7 @@ public class MediaPreviewActivity extends PassphraseRequiredActionBarActivity im
|
||||
|
||||
@Override
|
||||
public void onModified(Recipient recipient) {
|
||||
initializeActionBar();
|
||||
Util.runOnMain(this::initializeActionBar);
|
||||
}
|
||||
|
||||
private void initializeActionBar() {
|
||||
|
@ -46,6 +46,7 @@ import org.thoughtcrime.securesms.contacts.avatars.ContactPhotoFactory;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientModifiedListener;
|
||||
import org.thoughtcrime.securesms.service.WebRtcCallService;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.VerifySpan;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
import org.webrtc.SurfaceViewRenderer;
|
||||
@ -339,9 +340,11 @@ public class WebRtcCallScreen extends FrameLayout implements RecipientModifiedLi
|
||||
|
||||
@Override
|
||||
public void onModified(Recipient recipient) {
|
||||
if (recipient == this.recipient) {
|
||||
Util.runOnMain(() -> {
|
||||
if (recipient == WebRtcCallScreen.this.recipient) {
|
||||
setPersonInfo(recipient);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static interface HangupButtonListener {
|
||||
|
@ -1299,6 +1299,8 @@ public class DatabaseFactory {
|
||||
db.insert("recipient_preferences", null, contentValues);
|
||||
}
|
||||
}
|
||||
|
||||
if (cursor != null) cursor.close();
|
||||
}
|
||||
|
||||
if (oldVersion < INTERNAL_SYSTEM_DISPLAY_NAME) {
|
||||
|
Loading…
Reference in New Issue
Block a user