mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-11 12:40:22 -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
|
@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
|
||||||
@ -1557,7 +1561,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