mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Removed hack that is no longer necessary after fixing the activity stack
This commit is contained in:
parent
aa4b20dd9d
commit
95c748c183
@ -231,7 +231,6 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
|
||||
private static final String EXTRA_FOLDER_NAMES = "folderNames";
|
||||
private static final String EXTRA_TITLE = "title";
|
||||
private static final String EXTRA_LIST_POSITION = "listPosition";
|
||||
private static final String EXTRA_RETURN_FROM_MESSAGE_VIEW = "returnFromMessageView";
|
||||
|
||||
/**
|
||||
* Maps a {@link SortType} to a {@link Comparator} implementation.
|
||||
@ -571,34 +570,6 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the message list that was used to open the {@link MessageView} for a message.
|
||||
*
|
||||
* <p>
|
||||
* <strong>Note:</strong>
|
||||
* The {@link MessageList} instance should still be around and all we do is bring it back to
|
||||
* the front (see the activity flags).<br>
|
||||
* Out of sheer paranoia we also set the extras that were used to create the original
|
||||
* {@code MessageList} instance. Using those, the activity can be recreated in the unlikely
|
||||
* case of it having been killed by the OS.
|
||||
* </p>
|
||||
*
|
||||
* @param context
|
||||
* The {@link Context} instance to invoke the {@link Context#startActivity(Intent)}
|
||||
* method on.
|
||||
* @param extras
|
||||
* The extras used to create the original {@code MessageList} instance.
|
||||
*
|
||||
* @see MessageView#actionView(Context, MessageReference, ArrayList, Bundle)
|
||||
*/
|
||||
public static void actionHandleFolder(Context context, Bundle extras) {
|
||||
Intent intent = new Intent(context, MessageList.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
intent.putExtras(extras);
|
||||
intent.putExtra(EXTRA_RETURN_FROM_MESSAGE_VIEW, true);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
|
||||
public static void actionHandleFolder(Context context, Account account, String folder) {
|
||||
Intent intent = new Intent(context, MessageList.class);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
|
||||
@ -732,15 +703,6 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
|
||||
}
|
||||
|
||||
private void initializeMessageList(Intent intent, boolean create) {
|
||||
boolean returnFromMessageView = intent.getBooleanExtra(
|
||||
EXTRA_RETURN_FROM_MESSAGE_VIEW, false);
|
||||
|
||||
if (!create && returnFromMessageView) {
|
||||
// We're returning from the MessageView activity with "Manage back button" enabled.
|
||||
// So just leave the activity in the state it was left in.
|
||||
return;
|
||||
}
|
||||
|
||||
String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT);
|
||||
mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user