mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
clickedButtonAtIndex callblack is dispatched to avoid application crashes
This commit is contained in:
parent
8d8c5dcabd
commit
38156c0873
1 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
Copyright 2014 OpenMarket Ltd
|
||||
|
||||
|
@ -188,7 +189,9 @@
|
|||
blockCustomAlert_onClick block = [actions objectAtIndex:buttonIndex];
|
||||
if ([block isEqual:[NSNull null]] == NO) {
|
||||
// And call it
|
||||
block(self);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
block(self);
|
||||
});
|
||||
}
|
||||
// Release alert reference
|
||||
_alert = nil;
|
||||
|
@ -201,7 +204,9 @@
|
|||
blockCustomAlert_onClick block = [actions objectAtIndex:buttonIndex];
|
||||
if ([block isEqual:[NSNull null]] == NO) {
|
||||
// And call it
|
||||
block(self);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
block(self);
|
||||
});
|
||||
}
|
||||
// Release _alert reference
|
||||
_alert = nil;
|
||||
|
|
Loading…
Reference in a new issue