Commit 9221ad0c authored by Felix Paul Kühne's avatar Felix Paul Kühne

VLCAlertView: make sure the completion handler is actually being called

parent 3200ac1a
......@@ -2,7 +2,7 @@
* VLCStatusLabel.m
* VLC for iOS
*****************************************************************************
* Copyright (c) 2014 VideoLAN. All rights reserved.
* Copyright (c) 2014-2015 VideoLAN. All rights reserved.
* $Id$
*
* Authors: Carola Nitz <nitz.carola # googlemail.com>
......@@ -45,11 +45,19 @@
}
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
if (self.completion) {
self.completion(buttonIndex == self.cancelButtonIndex, buttonIndex);
self.completion = nil;
self.delegate = nil;
}
}
- (void)show
{
if (self.completion)
self.delegate = self;
[super show];
}
@end
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