mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-06 17:13:23 +02:00
Option to show messages, folders and accounts on startup
This commit is contained in:
@@ -22,6 +22,9 @@ package eu.faircode.email;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
public class ReceiverAutostart extends BroadcastReceiver {
|
||||
@Override
|
||||
@@ -31,6 +34,13 @@ public class ReceiverAutostart extends BroadcastReceiver {
|
||||
Log.i("Received " + intent);
|
||||
ServiceSynchronize.boot(context);
|
||||
ServiceSend.boot(context);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
if (!prefs.getBoolean("unified", true))
|
||||
editor.putString("startup", "folders");
|
||||
editor.remove("unified");
|
||||
editor.apply();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user