Merge pull request #5594 from ByteHamster/simplify-string
Simplify confusing string with two plurals
This commit is contained in:
commit
41f6bc7616
|
@ -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) {
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue