diff options
author | ByteHamster <info@bytehamster.com> | 2021-12-10 21:42:35 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2021-12-10 21:42:35 +0100 |
commit | 897889923c89441aa8e14960e3f8799318695fb1 (patch) | |
tree | 1211c9e602116e200cecf78c68edace157ee1cdd | |
parent | 434cd2b79f2679ca8b01c10723e5663d3b265fb6 (diff) | |
download | AntennaPod-897889923c89441aa8e14960e3f8799318695fb1.zip |
Simplify confusing string with two plurals
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/actions/EpisodeMultiSelectActionHandler.java | 13 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 4 |
2 files changed, 3 insertions, 14 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/actions/EpisodeMultiSelectActionHandler.java b/app/src/main/java/de/danoeh/antennapod/fragment/actions/EpisodeMultiSelectActionHandler.java index 028d2fff4..710ec6ce0 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/actions/EpisodeMultiSelectActionHandler.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/actions/EpisodeMultiSelectActionHandler.java @@ -95,16 +95,13 @@ public class EpisodeMultiSelectActionHandler { private void deleteChecked() { int countHasMedia = 0; - int countNoMedia = 0; for (FeedItem feedItem : selectedItems) { if (feedItem.hasMedia() && feedItem.getMedia().isDownloaded()) { countHasMedia++; DBWriter.deleteFeedMediaOfItem(activity, feedItem.getMedia().getId()); - } else { - countNoMedia++; } } - showMessageMore(R.plurals.deleted_multi_episode_batch_label, countNoMedia, countHasMedia); + showMessage(R.plurals.deleted_multi_episode_batch_label, countHasMedia); } private void showMessage(@PluralsRes int msgId, int numItems) { @@ -112,14 +109,6 @@ public class EpisodeMultiSelectActionHandler { .getQuantityString(msgId, numItems, numItems), Snackbar.LENGTH_LONG); } - private void showMessageMore(@PluralsRes int msgId, int countNoMedia, int countHasMedia) { - activity.showSnackbarAbovePlayer(activity.getResources() - .getQuantityString(msgId, - (countHasMedia + countNoMedia), - (countHasMedia + countNoMedia), countHasMedia), - Snackbar.LENGTH_LONG); - } - private long[] getSelectedIds() { long[] checkedIds = new long[selectedItems.size()]; for (int i = 0; i < selectedItems.size(); ++i) { diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 86b3443f3..22607f58b 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -202,8 +202,8 @@ <string name="delete_failed">Unable to delete file. Rebooting the device could help.</string> <string name="delete_episode_label">Delete Episode</string> <plurals name="deleted_multi_episode_batch_label"> - <item quantity="one">%d episode selected, %d download deleted.</item> - <item quantity="other">%d episodes selected, %d download(s) deleted.</item> + <item quantity="one">1 downloaded episode deleted.</item> + <item quantity="other">%d downloaded episodes deleted.</item> </plurals> <string name="remove_new_flag_label">Remove \"new\" flag</string> <string name="removed_new_flag_label">Removed \"new\" flag</string> |