mirror of https://github.com/M66B/FairEmail.git
Small improvement
This commit is contained in:
parent
35ed2e5187
commit
c671c1b9d9
|
@ -586,7 +586,10 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
public void folderCreated(FolderEvent e) {
|
||||
try {
|
||||
wlFolder.acquire();
|
||||
Log.i("Folder created=" + e.getFolder().getFullName());
|
||||
|
||||
String name = e.getFolder().getFullName();
|
||||
Log.i("Folder created=" + name);
|
||||
if (db.folder().getFolderByName(account.id, name) == null)
|
||||
reload(ServiceSynchronize.this, "folder created");
|
||||
} finally {
|
||||
wlFolder.release();
|
||||
|
@ -597,13 +600,14 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
public void folderRenamed(FolderEvent e) {
|
||||
try {
|
||||
wlFolder.acquire();
|
||||
Log.i("Folder renamed=" + e.getFolder().getFullName());
|
||||
|
||||
String old = e.getFolder().getFullName();
|
||||
String name = e.getNewFolder().getFullName();
|
||||
Log.i("Folder renamed from=" + old + " to=" + name);
|
||||
|
||||
int count = db.folder().renameFolder(account.id, old, name);
|
||||
Log.i("Renamed to " + name + " count=" + count);
|
||||
|
||||
if (count == 0)
|
||||
reload(ServiceSynchronize.this, "folder renamed");
|
||||
} finally {
|
||||
wlFolder.release();
|
||||
|
@ -614,7 +618,10 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
public void folderDeleted(FolderEvent e) {
|
||||
try {
|
||||
wlFolder.acquire();
|
||||
Log.i("Folder deleted=" + e.getFolder().getFullName());
|
||||
|
||||
String name = e.getFolder().getFullName();
|
||||
Log.i("Folder deleted=" + name);
|
||||
if (db.folder().getFolderByName(account.id, name) != null)
|
||||
reload(ServiceSynchronize.this, "folder deleted");
|
||||
} finally {
|
||||
wlFolder.release();
|
||||
|
|
Loading…
Reference in New Issue