Commit 7060eeb4 authored by Soomin Lee's avatar Soomin Lee Committed by Jean-Baptiste Kempf

iOS: Fix empty selection deletion with CollectionView

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 95ae3ba0
Pipeline #61 failed with stage
in 0 seconds
......@@ -1404,7 +1404,7 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
{
NSArray *indexPaths = [self usingTableViewToShowData] ? [self.tableView indexPathsForSelectedRows] : [self.collectionView indexPathsForSelectedItems];
if (!indexPaths && !_deleteFromTableView) {
if ((!indexPaths || [indexPaths count] == 0) && !_deleteFromTableView) {
UIAlertController *invalidSelection = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"DELETE_INVALID_TITLE", nil) message:NSLocalizedString(@"DELETE_INVALID_MESSAGE", nil) preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *doneAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_OK", nil) style:UIAlertActionStyleDefault handler:nil];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment