use of org.fdroid.fdroid.views.updates.DismissResult in project fdroidclient by f-droid.
the class AppStatusListItemController method onDismissApp.
@NonNull
@Override
protected DismissResult onDismissApp(@NonNull App app) {
AppUpdateStatus status = getCurrentStatus();
CharSequence message = null;
if (status != null) {
AppUpdateStatusManager manager = AppUpdateStatusManager.getInstance(activity);
manager.removeApk(status.getUniqueKey());
switch(status.status) {
case ReadyToInstall:
manager.markAsNoLongerPendingInstall(status);
// of a "Ready to install" app being dismissed.
break;
case Downloading:
cancelDownload();
message = activity.getString(R.string.app_list__dismiss_downloading_app);
break;
}
}
return new DismissResult(message, true);
}
use of org.fdroid.fdroid.views.updates.DismissResult in project fdroidclient by f-droid.
the class UpdateableAppListItemController method onDismissApp.
@Override
@NonNull
protected DismissResult onDismissApp(@NonNull App app) {
AppPrefs prefs = app.getPrefs(activity);
prefs.ignoreThisUpdate = app.suggestedVersionCode;
// The act of updating here will trigger a re-query of the "can update" apps, so no need to do anything else
// to update the UI in response to this.
AppPrefsProvider.Helper.update(activity, app, prefs);
return new DismissResult(activity.getString(R.string.app_list__dismiss_app_update), false);
}
Aggregations