mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 00:29:11 +01:00
Use "singleTask" to ensure a single ConversationActivity instance.
1) Mark the Activity as singleTask. 2) Process onNewIntent for updates. 3) Propagate onNewIntent to the ConversationFragment. Fixes #2232 Fixes #1532 Fixes #146 Fixes #851 Closes #2266
This commit is contained in:
committed by
Jake McGinty
parent
d7419caa4b
commit
1443d846c4
@@ -78,6 +78,16 @@ public class ConversationFragment extends ListFragment
|
||||
this.listener = (ConversationFragmentListener)activity;
|
||||
}
|
||||
|
||||
public void onNewIntent() {
|
||||
if (actionMode != null) {
|
||||
actionMode.finish();
|
||||
}
|
||||
|
||||
initializeResources();
|
||||
initializeListAdapter();
|
||||
getLoaderManager().restartLoader(0, null, this);
|
||||
}
|
||||
|
||||
private void initializeResources() {
|
||||
this.masterSecret = this.getActivity().getIntent().getParcelableExtra("master_secret");
|
||||
this.recipients = RecipientFactory.getRecipientsForIds(getActivity(), getActivity().getIntent().getLongArrayExtra("recipients"), true);
|
||||
|
||||
Reference in New Issue
Block a user