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

Commit dda8395c authored by cketti's avatar cketti
Browse files

Make sure we always have the ID of a folder when fetching the unread/flagged count

parent 9a5fca2d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1521,6 +1521,10 @@ public class LocalStore extends Store implements Serializable {

        @Override
        public int getUnreadMessageCount() throws MessagingException {
            if (mFolderId == -1) {
                open(OpenMode.READ_WRITE);
            }

            try {
                return database.execute(false, new DbCallback<Integer>() {
                    @Override
@@ -1548,7 +1552,7 @@ public class LocalStore extends Store implements Serializable {

        @Override
        public int getFlaggedMessageCount() throws MessagingException {
            if (!isOpen()) {
            if (mFolderId == -1) {
                open(OpenMode.READ_WRITE);
            }