Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit f3686a3f authored by cketti's avatar cketti Committed by GitHub
Browse files

Merge pull request #3740 from morckx/fix-uninitialized-drawer-use

Don't try to operate on an uninitialized drawer
parents 33261885 ed7ca86b
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -1698,15 +1698,18 @@ public class MessageList extends K9Activity implements MessageListFragmentListen

        List<String> folderServerIds = search.getFolderServerIds();
        singleFolderMode = singleAccountMode && folderServerIds.size() == 1;
        if (singleFolderMode) {

        // now we know if we are in single account mode and need a subtitle
        actionBarSubTitle.setVisibility((!singleFolderMode) ? View.GONE : View.VISIBLE);

        if (drawer == null) {
            return;
        } else if (singleFolderMode) {
            drawer.selectFolder(folderServerIds.get(0));
        } else if (search.getId().equals(SearchAccount.UNIFIED_INBOX)) {
            drawer.selectUnifiedInbox();
        } else {
            drawer.selectFolder(null);
        }

        // now we know if we are in single account mode and need a subtitle
        actionBarSubTitle.setVisibility((!singleFolderMode) ? View.GONE : View.VISIBLE);
    }
}