Fix several bugs related to shortcut handling (#2919)

* Improve ShortcuHelper.updateShortcuts to take all actions into account

* Remove now useless calls to removeShortcut

* Add doc to explain the usage of maxShortcut

* Fix typo in doc of maxShortcuts
This commit is contained in:
Matthias Paulmier
2026-01-09 17:24:29 +01:00
committed by GitHub
parent 18dbb24375
commit ace353d71d
5 changed files with 164 additions and 84 deletions

View File

@@ -794,7 +794,7 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
invalidateOptionsMenu();
ShortcutHelper.updateShortcuts(this, loyaltyCard);
ShortcutHelper.updateShortcuts(this);
}
private void setStateBasedOnImageTypes() {
@@ -896,7 +896,6 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
DBHelper.updateLoyaltyCardArchiveStatus(database, loyaltyCardId, 1);
Toast.makeText(LoyaltyCardViewActivity.this, R.string.archived, Toast.LENGTH_LONG).show();
ShortcutHelper.removeShortcut(LoyaltyCardViewActivity.this, loyaltyCardId);
new ListWidget().updateAll(LoyaltyCardViewActivity.this);
// Re-init loyaltyCard with new data from DB
@@ -922,7 +921,6 @@ public class LoyaltyCardViewActivity extends CatimaAppCompatActivity implements
DBHelper.deleteLoyaltyCard(database, LoyaltyCardViewActivity.this, loyaltyCardId);
ShortcutHelper.removeShortcut(LoyaltyCardViewActivity.this, loyaltyCardId);
new ListWidget().updateAll(LoyaltyCardViewActivity.this);
finish();