mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Add files to draft edited within 3 minutes
This commit is contained in:
@@ -1419,13 +1419,18 @@ public class FragmentCompose extends FragmentBase {
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
final Context context = getContext();
|
||||
|
||||
if (state == State.LOADED) {
|
||||
Bundle extras = new Bundle();
|
||||
extras.putBoolean("autosave", true);
|
||||
onAction(R.id.action_save, extras, "pause");
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
prefs.edit().putLong("last_composed", new Date().getTime()).apply();
|
||||
}
|
||||
|
||||
ConnectivityManager cm = (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
|
||||
cm.unregisterNetworkCallback(networkCallback);
|
||||
|
||||
super.onPause();
|
||||
|
||||
Reference in New Issue
Block a user