mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-14 21:45:14 -05:00
Make sure we always have the ID of a folder when fetching the unread/flagged count
This commit is contained in:
parent
04ad291ba2
commit
01438d62c9
@ -1530,6 +1530,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
|
||||
@ -1557,7 +1561,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