mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-23 16:18:50 -05:00
Make sure we always have the ID of a folder when fetching the unread/flagged count
This commit is contained in:
parent
9a5fca2d16
commit
dda8395c7a
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user