mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Use MXWeakify/MXStrongifyAndReturnIfNil.
This commit is contained in:
@@ -1245,18 +1245,15 @@ TableViewSectionsDelegate>
|
||||
|
||||
- (void)refreshSystemNotificationSettings
|
||||
{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
MXWeakify(self);
|
||||
|
||||
// Get the system notification settings to check authorization status and configuration.
|
||||
[[UNUserNotificationCenter currentNotificationCenter] getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
|
||||
[UNUserNotificationCenter.currentNotificationCenter getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
|
||||
self.systemNotificationSettings = settings;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
self.systemNotificationSettings = settings;
|
||||
[self.tableView reloadData];
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user