Implemented widget poll

This commit is contained in:
M66B 2019-12-07 21:16:57 +01:00
parent 9864465e8a
commit 30ec86f9da
1 changed files with 13 additions and 1 deletions

View File

@ -774,7 +774,19 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
if (intent.getBooleanExtra("refresh", false)) {
intent.removeExtra("refresh");
setIntent(intent);
// TODO: sync all
new SimpleTask<Void>() {
@Override
protected Void onExecute(Context context, Bundle args) {
WorkerPoll.sync(context);
return null;
}
@Override
protected void onException(Bundle args, Throwable ex) {
Log.unexpectedError(getSupportFragmentManager(), ex);
}
}.execute(this, new Bundle(), "view:refresh");
}
String action = intent.getAction();