mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-07 17:43:18 +02:00
Added debug option to add new folders to the nav menu
This commit is contained in:
@@ -22,9 +22,11 @@ package eu.faircode.email;
|
||||
import static androidx.room.ForeignKey.CASCADE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.preference.PreferenceManager;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.ForeignKey;
|
||||
import androidx.room.Index;
|
||||
@@ -331,7 +333,7 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
||||
display = "Envoyés";
|
||||
}
|
||||
|
||||
void inheritFrom(EntityFolder parent) {
|
||||
void inheritFrom(EntityFolder parent, Context context) {
|
||||
if (parent == null)
|
||||
return;
|
||||
if (!EntityFolder.USER.equals(type))
|
||||
@@ -344,6 +346,11 @@ public class EntityFolder extends EntityOrder implements Serializable {
|
||||
this.sync_days = parent.sync_days;
|
||||
this.keep_days = parent.keep_days;
|
||||
this.notify = parent.notify;
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean auto_folder_nav = prefs.getBoolean("auto_folder_nav", false);
|
||||
if (auto_folder_nav)
|
||||
this.navigation = true;
|
||||
}
|
||||
|
||||
static boolean shouldPoll(String type) {
|
||||
|
||||
Reference in New Issue
Block a user