From 3a7a392f333b3cff4a1f4b143929c14a19f3fcb1 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 18 Sep 2018 10:13:36 +0000 Subject: [PATCH] Prevent deleting system folders --- app/src/main/java/eu/faircode/email/FragmentFolder.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentFolder.java b/app/src/main/java/eu/faircode/email/FragmentFolder.java index d4f9fdebff..f0c4bd0ae1 100644 --- a/app/src/main/java/eu/faircode/email/FragmentFolder.java +++ b/app/src/main/java/eu/faircode/email/FragmentFolder.java @@ -314,8 +314,7 @@ public class FragmentFolder extends FragmentEx { etRename.setEnabled(folder == null || EntityFolder.USER.equals(folder.type)); cbSynchronize.setEnabled(false); btnSave.setEnabled(true); - ibDelete.setEnabled(true); - ibDelete.setVisibility(folder == null ? View.GONE : View.VISIBLE); + ibDelete.setVisibility(folder == null || !EntityFolder.USER.equals(folder.type) ? View.GONE : View.VISIBLE); Bundle args = new Bundle(); args.putLong("account", folder == null ? account : folder.account);