By default list subscribed folders only

This commit is contained in:
M66B
2019-05-23 18:13:03 +02:00
parent 84b06ef4e4
commit 8965d69b99
8 changed files with 49 additions and 74 deletions

View File

@@ -20,10 +20,8 @@ package eu.faircode.email;
*/
import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.NonNull;
import androidx.preference.PreferenceManager;
import androidx.room.Entity;
import androidx.room.ForeignKey;
import androidx.room.Index;
@@ -216,16 +214,6 @@ public class EntityFolder extends EntityOrder implements Serializable {
return R.drawable.baseline_folder_24;
}
boolean isHidden(Context context) {
if (hide)
return true;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean subscriptions = prefs.getBoolean("subscriptions", false);
return (subscriptions && subscribed != null && !subscribed);
}
String getDisplayName(Context context) {
return (display == null ? Helper.localizeFolderName(context, name) : display);
}