|
|
@ -20,6 +20,8 @@ package eu.faircode.email;
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import android.content.SharedPreferences;
|
|
|
|
|
|
|
|
import android.preference.PreferenceManager;
|
|
|
|
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import androidx.room.Entity;
|
|
|
|
import androidx.room.Entity;
|
|
|
@ -199,6 +201,16 @@ public class EntityFolder implements Serializable {
|
|
|
|
return R.drawable.baseline_folder_24;
|
|
|
|
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) {
|
|
|
|
String getDisplayName(Context context) {
|
|
|
|
return (display == null ? Helper.localizeFolderName(context, name) : display);
|
|
|
|
return (display == null ? Helper.localizeFolderName(context, name) : display);
|
|
|
|
}
|
|
|
|
}
|
|
|
|