Fix item activity reopening itself after syncing when the app is opened by a sync result notification
This commit is contained in:
parent
dad51d334a
commit
fb48608068
@ -202,10 +202,13 @@ public class MainActivity extends AppCompatActivity implements SwipeRefreshLayou
|
|||||||
getAccountCredentials(accounts);
|
getAccountCredentials(accounts);
|
||||||
viewModel.setAccounts(accounts);
|
viewModel.setAccounts(accounts);
|
||||||
|
|
||||||
|
// the activity was just opened
|
||||||
if (drawer == null) {
|
if (drawer == null) {
|
||||||
drawer = drawerManager.buildDrawer(accounts);
|
drawer = drawerManager.buildDrawer(accounts);
|
||||||
drawer.setSelection(DrawerManager.ARTICLES_ITEM_ID);
|
drawer.setSelection(DrawerManager.ARTICLES_ITEM_ID);
|
||||||
updateDrawerFeeds();
|
updateDrawerFeeds();
|
||||||
|
|
||||||
|
openItemActivity(getIntent());
|
||||||
} else if (accounts.size() < drawerManager.getNumberOfProfiles() && !accounts.isEmpty()) {
|
} else if (accounts.size() < drawerManager.getNumberOfProfiles() && !accounts.isEmpty()) {
|
||||||
drawerManager.updateHeader(accounts);
|
drawerManager.updateHeader(accounts);
|
||||||
updateDrawerFeeds();
|
updateDrawerFeeds();
|
||||||
@ -225,7 +228,7 @@ public class MainActivity extends AppCompatActivity implements SwipeRefreshLayou
|
|||||||
savedInstanceState.clear();
|
savedInstanceState.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
openItemActivity(getIntent());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user