1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

Use isFinishing() instead

As suggested by @maniac103
https://github.com/k9mail/k-9/commit/41570e4#commitcomment-7388209
This commit is contained in:
Joe Steele 2014-08-14 16:22:51 -04:00
parent 41570e4305
commit c881207295

View File

@ -99,8 +99,6 @@ public class FolderList extends K9ListActivity {
private TextView mActionBarSubTitle; private TextView mActionBarSubTitle;
private TextView mActionBarUnread; private TextView mActionBarUnread;
private boolean mIsFinished = false;
class FolderListHandler extends Handler { class FolderListHandler extends Handler {
public void refreshTitle() { public void refreshTitle() {
@ -282,7 +280,7 @@ public class FolderList extends K9ListActivity {
context = this; context = this;
onNewIntent(getIntent()); onNewIntent(getIntent());
if (mIsFinished) { if (isFinishing()) {
/* /*
* onNewIntent() may call finish(), but execution will still continue here. * onNewIntent() may call finish(), but execution will still continue here.
* We return now because we don't want to display the changelog which can * We return now because we don't want to display the changelog which can
@ -323,7 +321,6 @@ public class FolderList extends K9ListActivity {
* account, and then the account is deleted or data is wiped, and * account, and then the account is deleted or data is wiped, and
* then the shortcut is used. * then the shortcut is used.
*/ */
mIsFinished = true;
finish(); finish();
return; return;
} }
@ -331,7 +328,6 @@ public class FolderList extends K9ListActivity {
if (intent.getBooleanExtra(EXTRA_FROM_SHORTCUT, false) && if (intent.getBooleanExtra(EXTRA_FROM_SHORTCUT, false) &&
!K9.FOLDER_NONE.equals(mAccount.getAutoExpandFolderName())) { !K9.FOLDER_NONE.equals(mAccount.getAutoExpandFolderName())) {
onOpenFolder(mAccount.getAutoExpandFolderName()); onOpenFolder(mAccount.getAutoExpandFolderName());
mIsFinished = true;
finish(); finish();
} else { } else {
initializeActivityView(); initializeActivityView();