mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-06 00:53:26 +02:00
Show if folder read only
This commit is contained in:
@@ -665,10 +665,16 @@ public class ServiceSynchronize extends LifecycleService {
|
||||
|
||||
final IMAPFolder ifolder = (IMAPFolder) istore.getFolder(folder.name);
|
||||
try {
|
||||
//if ("Postausgang".equals(folder.name))
|
||||
// throw new ReadOnlyFolderException(ifolder);
|
||||
ifolder.open(Folder.READ_WRITE);
|
||||
db.folder().setFolderReadOnly(folder.id, false);
|
||||
} catch (ReadOnlyFolderException ex) {
|
||||
Log.w(folder.name + " read only");
|
||||
db.folder().setFolderError(folder.id, Helper.formatThrowable(ex, true));
|
||||
try {
|
||||
ifolder.open(Folder.READ_ONLY);
|
||||
db.folder().setFolderReadOnly(folder.id, true);
|
||||
} catch (MessagingException ex1) {
|
||||
Log.w(ex1);
|
||||
db.folder().setFolderState(folder.id, null);
|
||||
|
||||
Reference in New Issue
Block a user