Several fixes for shortcut handling

- Update the card priority in the dynamic shortcut manager also when the
  card isn't opened from the main screen
- Remove from dynamic shortcut manager when the card gets archived
- Fix icons disappearing of other cards when one card gets removed
This commit is contained in:
Sylvia van Os
2024-03-09 18:25:49 +01:00
parent 03a5a382e9
commit fa99c2ef7c
3 changed files with 11 additions and 14 deletions

View File

@@ -150,6 +150,7 @@ public class MainActivity extends CatimaAppCompatActivity implements LoyaltyCard
for (LoyaltyCard loyaltyCard : mAdapter.getSelectedItems()) {
Log.d(TAG, "Archiving card: " + loyaltyCard.id);
DBHelper.updateLoyaltyCardArchiveStatus(mDatabase, loyaltyCard.id, 1);
ShortcutHelper.removeShortcut(MainActivity.this, loyaltyCard.id);
updateLoyaltyCardList(false);
inputMode.finish();
invalidateOptionsMenu();
@@ -798,8 +799,6 @@ public class MainActivity extends CatimaAppCompatActivity implements LoyaltyCard
b.putIntegerArrayList("cardList", cardList);
intent.putExtras(b);
ShortcutHelper.updateShortcuts(MainActivity.this, loyaltyCard);
startActivity(intent);
}
}