Updated hideTopAlert method name

This commit is contained in:
Krishna Kishore Bandaru 2021-11-10 21:16:03 +05:30
parent 80b59a6ca8
commit e1261d9e4d
3 changed files with 6 additions and 6 deletions

View File

@ -101,8 +101,8 @@
/// Hides the current alert view. /// Hides the current alert view.
- (void)hideTopAlertView; - (void)hideTopAlertView;
/// Hides a persistent alert based on the type string. /// Hides a alert based on the type string.
- (void)hidePersistentTopAlertViewOfType:(nullable NSString *)type; - (void)hideTopAlertViewOfType:(nullable NSString *)type;
/// Removes a scheduled top alert given its top alert object. /// Removes a scheduled top alert given its top alert object.
- (void)removeTopAlertForObject:(nonnull MVMCoreTopAlertObject *)topAlertObject; - (void)removeTopAlertForObject:(nonnull MVMCoreTopAlertObject *)topAlertObject;

View File

@ -226,12 +226,12 @@
return hasAlert; return hasAlert;
} }
- (void)hidePersistentTopAlertViewOfType:(nullable NSString *)type { - (void)hideTopAlertViewOfType:(nullable NSString *)type {
if (type) { if (type) {
for (MVMCoreTopAlertOperation *operation in self.topAlertQueue.operations) { for (MVMCoreTopAlertOperation *operation in self.topAlertQueue.operations) {
// Cancel all persistent operations of this type. // Cancel all operations of this type.
if (operation.topAlertObject.persistent && [operation.topAlertObject.type isEqualToString:type]) { if ([operation.topAlertObject.type isEqualToString:type]) {
operation.reAddAfterCancel = NO; operation.reAddAfterCancel = NO;
[operation cancel]; [operation cancel];
} }

View File

@ -31,7 +31,7 @@ public extension MVMCoreUITopAlertView {
// Dismiss any top alerts that server wants us to dismiss/ // Dismiss any top alerts that server wants us to dismiss/
if let disableType = loadObject.responseInfoMap?.optionalStringForKey("disableType") { if let disableType = loadObject.responseInfoMap?.optionalStringForKey("disableType") {
MVMCoreAlertHandler.shared()?.hidePersistentTopAlertView(ofType: disableType) MVMCoreAlertHandler.shared()?.hideTopAlertView(ofType: disableType)
} }
// Show any new top alert. // Show any new top alert.