Updater: Show "no items" view after deleting last update

Currently after removing the last update from the list, you end up
with a completely empty list. It should look like when you open the app
again with no updates

Change-Id: I77f025baf2e20385d31b5e897b92ddf24680be99
This commit is contained in:
Michael W
2025-01-11 16:36:45 +01:00
committed by Bruno Martins
parent 6fafcc4e7f
commit 5ab3076f91

View File

@@ -145,6 +145,12 @@ public class UpdatesActivity extends UpdatesListActivity implements UpdateImport
} else if (UpdaterController.ACTION_UPDATE_REMOVED.equals(intent.getAction())) {
String downloadId = intent.getStringExtra(UpdaterController.EXTRA_DOWNLOAD_ID);
mAdapter.removeItem(downloadId);
List<UpdateInfo> sortedUpdates =
mUpdaterService.getUpdaterController().getUpdates();
if (sortedUpdates.isEmpty()) {
findViewById(R.id.no_new_updates_view).setVisibility(View.VISIBLE);
findViewById(R.id.recycler_view).setVisibility(View.GONE);
}
}
}
};