mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-29 09:01:30 +01:00
Made notification actions pro instead of notification previews
This commit is contained in:
@@ -34,10 +34,10 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.DeadSystemException;
|
||||
import android.os.RemoteException;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.webkit.CookieManager;
|
||||
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
@@ -90,6 +90,7 @@ public class ApplicationEx extends Application {
|
||||
}
|
||||
});
|
||||
|
||||
upgrade(this);
|
||||
createNotificationChannels();
|
||||
if (Helper.hasWebView(this))
|
||||
CookieManager.getInstance().setAcceptCookie(false);
|
||||
@@ -118,6 +119,25 @@ public class ApplicationEx extends Application {
|
||||
Log.i(message + " " + mb + " MB" + " " + perc + " %");
|
||||
}
|
||||
|
||||
static void upgrade(Context context) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
int version = prefs.getInt("version", 468);
|
||||
if (version < BuildConfig.VERSION_CODE) {
|
||||
Log.i("Upgrading from " + version + " to " + BuildConfig.VERSION_CODE);
|
||||
|
||||
SharedPreferences.Editor editor = prefs.edit();
|
||||
|
||||
editor.remove("notify_trash");
|
||||
editor.remove("notify_archive");
|
||||
editor.remove("notify_reply");
|
||||
editor.remove("notify_flag");
|
||||
editor.remove("notify_seen");
|
||||
|
||||
editor.putInt("version", BuildConfig.VERSION_CODE);
|
||||
editor.apply();
|
||||
}
|
||||
}
|
||||
|
||||
static Context getLocalizedContext(Context context) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
boolean english = prefs.getBoolean("english", false);
|
||||
|
||||
Reference in New Issue
Block a user