mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 00:58: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
|
@Override
|
||||||
public int getUnreadMessageCount() throws MessagingException {
|
public int getUnreadMessageCount() throws MessagingException {
|
||||||
|
if (mFolderId == -1) {
|
||||||
|
open(OpenMode.READ_WRITE);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return database.execute(false, new DbCallback<Integer>() {
|
return database.execute(false, new DbCallback<Integer>() {
|
||||||
@Override
|
@Override
|
||||||
@ -1548,7 +1552,7 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getFlaggedMessageCount() throws MessagingException {
|
public int getFlaggedMessageCount() throws MessagingException {
|
||||||
if (!isOpen()) {
|
if (mFolderId == -1) {
|
||||||
open(OpenMode.READ_WRITE);
|
open(OpenMode.READ_WRITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user