mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Fix to get viewing readonly folders working
This commit is contained in:
parent
ac5056f46d
commit
8a17445aee
@ -64,7 +64,11 @@ class FolderViewBase implements FolderView, MessageChangedListener,
|
||||
Message messages[] = null;
|
||||
try {
|
||||
if (!fFolder.isOpen()) {
|
||||
fFolder.open(Folder.READ_WRITE);
|
||||
try {
|
||||
fFolder.open(Folder.READ_WRITE);
|
||||
} catch (MessagingException e) {
|
||||
fFolder.open(Folder.READ_ONLY);
|
||||
}
|
||||
}
|
||||
messages = fFolder.getMessages();
|
||||
FetchProfile fp = new FetchProfile();
|
||||
|
@ -355,7 +355,11 @@ public class ViewedStoreBase extends ViewedFolderBase implements ViewedStore {
|
||||
if (folder != null) {
|
||||
|
||||
if (!folder.isOpen()) {
|
||||
folder.open(Folder.READ_WRITE);
|
||||
try {
|
||||
folder.open(Folder.READ_WRITE);
|
||||
} catch (MessagingException e) {
|
||||
folder.open(Folder.READ_ONLY);
|
||||
}
|
||||
}
|
||||
int messageCount = folder.getMessageCount();
|
||||
int unreadCount = folder.getUnreadMessageCount();
|
||||
|
Loading…
Reference in New Issue
Block a user