mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 11:28:41 +01:00
Enable synchronization on pull-to-refresh
This commit is contained in:
@@ -487,6 +487,16 @@ public class FragmentMessages extends FragmentBase {
|
||||
args.putLong("folder", folder);
|
||||
|
||||
new SimpleTask<Boolean>() {
|
||||
@Override
|
||||
protected void onPreExecute(Bundle args) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
||||
boolean enabled = prefs.getBoolean("enabled", true);
|
||||
if (!enabled) {
|
||||
prefs.edit().putBoolean("enabled", true).apply();
|
||||
ServiceSynchronize.reload(getContext(), "refresh");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Boolean onExecute(Context context, Bundle args) {
|
||||
long fid = args.getLong("folder");
|
||||
|
||||
Reference in New Issue
Block a user