Fix crash where toolbar was updated off of the main thread.

master
Greyson Parrelli 2018-12-01 10:00:35 -08:00
parent b6098a26b4
commit a81cc685b2
1 changed files with 4 additions and 1 deletions

View File

@ -66,6 +66,7 @@ import org.thoughtcrime.securesms.util.DynamicNoActionBarTheme;
import org.thoughtcrime.securesms.util.DynamicTheme;
import org.thoughtcrime.securesms.util.SaveAttachmentTask;
import org.thoughtcrime.securesms.util.StickyHeaderDecoration;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;
import org.thoughtcrime.securesms.util.task.ProgressDialogAsyncTask;
@ -140,7 +141,9 @@ public class MediaOverviewActivity extends PassphraseRequiredActionBarActivity {
setSupportActionBar(this.toolbar);
getSupportActionBar().setTitle(recipient.toShortString());
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
this.recipient.addListener(recipient -> getSupportActionBar().setTitle(recipient.toShortString()));
this.recipient.addListener(recipient -> {
Util.runOnMain(() -> getSupportActionBar().setTitle(recipient.toShortString()));
});
}
public void onEnterMultiSelect() {