mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Improve comments and correct iOS version check logic.
This commit is contained in:
@@ -366,17 +366,24 @@ TableViewSectionsDelegate>
|
||||
{
|
||||
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_SHOW_DECODED_CONTENT];
|
||||
}
|
||||
if (![BuildSettings showNotificationsV2]){
|
||||
|
||||
if (@available(iOS 14.0, *)) {
|
||||
// Don't add Global settings message for iOS 14+
|
||||
} else {
|
||||
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_GLOBAL_SETTINGS_INDEX];
|
||||
}
|
||||
|
||||
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_PIN_MISSED_NOTIFICATIONS_INDEX];
|
||||
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_PIN_UNREAD_INDEX];
|
||||
if ([BuildSettings showNotificationsV2]){
|
||||
|
||||
if (@available(iOS 14.0, *)) {
|
||||
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_DEFAULT_SETTINGS_INDEX];
|
||||
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_MENTION_AND_KEYWORDS_SETTINGS_INDEX];
|
||||
[sectionNotificationSettings addRowWithTag:NOTIFICATION_SETTINGS_OTHER_SETTINGS_INDEX];
|
||||
} else {
|
||||
// Don't add new sections on pre iOS 14
|
||||
}
|
||||
|
||||
sectionNotificationSettings.headerTitle = NSLocalizedStringFromTable(@"settings_notifications", @"Vector", nil);
|
||||
[tmpSections addObject:sectionNotificationSettings];
|
||||
|
||||
@@ -4094,7 +4101,7 @@ TableViewSectionsDelegate>
|
||||
|
||||
- (void)showNotificationSettings: (NotificationSettingsScreen) screen
|
||||
{
|
||||
|
||||
//New notification screens are only supported on iOS 14+
|
||||
if (@available(iOS 14.0, *)) {
|
||||
NotificationSettingsCoordinatorBridgePresenter *notificationSettingsBridgePresenter = [[NotificationSettingsCoordinatorBridgePresenter alloc] initWithSession:self.mainSession];
|
||||
notificationSettingsBridgePresenter.delegate = self;
|
||||
@@ -4109,8 +4116,6 @@ TableViewSectionsDelegate>
|
||||
|
||||
|
||||
self.notificationSettingsBridgePresenter = notificationSettingsBridgePresenter;
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user