mirror of https://github.com/M66B/FairEmail.git
Enable synchronization on pull-to-refresh
This commit is contained in:
parent
8f4b4c5385
commit
be5f9697bc
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue