mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 06:08:31 +02:00
Run start service on foreground
This commit is contained in:
@@ -663,6 +663,11 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
args.putBoolean("childs", childs);
|
||||
|
||||
new SimpleTask<Void>() {
|
||||
@Override
|
||||
protected void onPostExecute(Bundle args) {
|
||||
ServiceSynchronize.eval(context, "refresh/folder");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Void onExecute(Context context, Bundle args) {
|
||||
long fid = args.getLong("folder");
|
||||
@@ -704,8 +709,6 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, "refresh/folder");
|
||||
|
||||
if (!now)
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_no_connection));
|
||||
|
||||
@@ -836,11 +839,15 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
|
||||
boolean subscribed = args.getBoolean("subscribed");
|
||||
|
||||
EntityOperation.subscribe(context, id, subscribed);
|
||||
ServiceSynchronize.eval(context, "subscribed=" + subscribed);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, Void data) {
|
||||
ServiceSynchronize.eval(context, "subscribed");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex);
|
||||
|
||||
Reference in New Issue
Block a user