diff --git a/NextcloudTalk/ChatTableViewCell.m b/NextcloudTalk/ChatTableViewCell.m index e9feffc65..24741622e 100644 --- a/NextcloudTalk/ChatTableViewCell.m +++ b/NextcloudTalk/ChatTableViewCell.m @@ -83,20 +83,12 @@ - (UIMenu *)getDeferredUserMenuForMessage:(NCChatMessage *)message UIDeferredMenuElement *deferredMenuElement; - if (@available(iOS 15.0, *)) { - // When iOS 15 is available, we can use an uncached provider so local time is not cached for example - deferredMenuElement = [UIDeferredMenuElement elementWithUncachedProvider:^(void (^ _Nonnull completion)(NSArray * _Nonnull)) { - [self getMenuUserActionsForMessage:message withCompletionBlock:^(NSArray *menuItems) { - completion(menuItems); - }]; - }]; - } else { - deferredMenuElement = [UIDeferredMenuElement elementWithProvider:^(void (^ _Nonnull completion)(NSArray * _Nonnull)) { - [self getMenuUserActionsForMessage:message withCompletionBlock:^(NSArray *menuItems) { - completion(menuItems); - }]; + // Use an uncached provider so local time is not cached + deferredMenuElement = [UIDeferredMenuElement elementWithUncachedProvider:^(void (^ _Nonnull completion)(NSArray * _Nonnull)) { + [self getMenuUserActionsForMessage:message withCompletionBlock:^(NSArray *menuItems) { + completion(menuItems); }]; - } + }]; return [UIMenu menuWithTitle:message.actorDisplayName children:@[deferredMenuElement]]; } diff --git a/NextcloudTalk/NCChatViewController.m b/NextcloudTalk/NCChatViewController.m index 96def2498..5a54a206b 100644 --- a/NextcloudTalk/NCChatViewController.m +++ b/NextcloudTalk/NCChatViewController.m @@ -370,10 +370,8 @@ - (void)viewDidLoad [self.autoCompletionView registerClass:[ChatMessageTableViewCell class] forCellReuseIdentifier:AutoCompletionCellIdentifier]; [self registerPrefixesForAutoCompletion:@[@"@"]]; self.autoCompletionView.backgroundColor = [UIColor secondarySystemBackgroundColor]; - - if (@available(iOS 15.0, *)) { - self.autoCompletionView.sectionHeaderTopPadding = 0; - } + self.autoCompletionView.sectionHeaderTopPadding = 0; + // Align separators to ChatMessageTableViewCell's title label self.autoCompletionView.separatorInset = UIEdgeInsetsMake(0, 50, 0, 0); diff --git a/NextcloudTalk/RoomsTableViewController.m b/NextcloudTalk/RoomsTableViewController.m index 309c3115c..6756cb121 100644 --- a/NextcloudTalk/RoomsTableViewController.m +++ b/NextcloudTalk/RoomsTableViewController.m @@ -463,10 +463,8 @@ - (void)updateAccountPickerMenu [[NCSettingsController sharedInstance] setActiveAccountWithAccountId:account.accountId]; }]; - if (@available(iOS 15.0, *)) { - if (account.unreadBadgeNumber > 0) { - switchAccountAction.subtitle = [NSString localizedStringWithFormat:NSLocalizedString(@"%ld notifications", nil), (long)account.unreadBadgeNumber]; - } + if (account.unreadBadgeNumber > 0) { + switchAccountAction.subtitle = [NSString localizedStringWithFormat:NSLocalizedString(@"%ld notifications", nil), (long)account.unreadBadgeNumber]; } if (account.active) {