diff --git a/Riot/Managers/Settings/RiotSettings.swift b/Riot/Managers/Settings/RiotSettings.swift index 09d5220ff..6db8ec7b3 100644 --- a/Riot/Managers/Settings/RiotSettings.swift +++ b/Riot/Managers/Settings/RiotSettings.swift @@ -26,7 +26,6 @@ final class RiotSettings: NSObject { static let enableCrashReport = "enableCrashReport" static let enableRageShake = "enableRageShake" static let createConferenceCallsWithJitsi = "createConferenceCallsWithJitsi" - static let messageReaction = "messageReaction" static let userInterfaceTheme = "userInterfaceTheme" static let notificationsShowDecryptedContent = "showDecryptedContent" static let pinRoomsWithMissedNotifications = "pinRoomsWithMissedNotif" @@ -120,12 +119,4 @@ final class RiotSettings: NSObject { UserDefaults.standard.set(newValue, forKey: UserDefaultsKeys.createConferenceCallsWithJitsi) } } - - var messageReaction: Bool { - get { - return UserDefaults.standard.bool(forKey: UserDefaultsKeys.messageReaction) - } set { - UserDefaults.standard.set(newValue, forKey: UserDefaultsKeys.messageReaction) - } - } } diff --git a/Riot/Modules/Room/DataSources/RoomDataSource.m b/Riot/Modules/Room/DataSources/RoomDataSource.m index 7282bd4eb..75208dbfc 100644 --- a/Riot/Modules/Room/DataSources/RoomDataSource.m +++ b/Riot/Modules/Room/DataSources/RoomDataSource.m @@ -61,7 +61,7 @@ self.markTimelineInitialEvent = NO; self.showBubbleDateTimeOnSelection = YES; - self.showReactions = RiotSettings.shared.messageReaction; + self.showReactions = YES; // Observe user interface theme change. kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) { diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 106c5a99a..780f7adc8 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -5157,7 +5157,7 @@ ReactionsMenuViewModel *reactionsMenuViewModel; CGRect bubbleComponentFrameInOverlayView = CGRectNull; - if (RiotSettings.shared.messageReaction && [cell isKindOfClass:MXKRoomBubbleTableViewCell.class] && [self.roomDataSource canReactToEventWithId:event.eventId]) + if ([cell isKindOfClass:MXKRoomBubbleTableViewCell.class] && [self.roomDataSource canReactToEventWithId:event.eventId]) { MXKRoomBubbleTableViewCell *roomBubbleTableViewCell = (MXKRoomBubbleTableViewCell*)cell; MXKRoomBubbleCellData *bubbleCellData = roomBubbleTableViewCell.bubbleData; diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index b397757e1..4cccbedf2 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -120,7 +120,6 @@ enum { LABS_USE_ROOM_MEMBERS_LAZY_LOADING_INDEX = 0, LABS_USE_JITSI_WIDGET_INDEX, - LABS_USE_MESSAGE_REACTION_INDEX, LABS_CRYPTO_INDEX, LABS_COUNT }; @@ -2136,20 +2135,7 @@ SignOutAlertPresenterDelegate> [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleJitsiForConference:) forControlEvents:UIControlEventTouchUpInside]; cell = labelAndSwitchCell; - } - else if (row == LABS_USE_MESSAGE_REACTION_INDEX) - { - MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath]; - - labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_message_reaction", @"Vector", nil); - labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.messageReaction; - labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor; - labelAndSwitchCell.mxkSwitch.enabled = YES; - - [labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleMessageReaction:) forControlEvents:UIControlEventTouchUpInside]; - - cell = labelAndSwitchCell; - } + } else if (row == LABS_CRYPTO_INDEX) { MXSession* session = [AppDelegate theDelegate].mxSessions[0]; @@ -3049,22 +3035,6 @@ SignOutAlertPresenterDelegate> } } -- (void)toggleMessageReaction:(id)sender -{ - if (sender && [sender isKindOfClass:UISwitch.class]) - { - UISwitch *switchButton = (UISwitch*)sender; - - RiotSettings.shared.messageReaction = switchButton.isOn; - - // Reset cached room data sources - MXKRoomDataSourceManager *roomDataSourceManager = [MXKRoomDataSourceManager sharedManagerForMatrixSession:self.mainSession]; - [roomDataSourceManager reset]; - - [self.tableView reloadData]; - } -} - - (void)toggleLabsEndToEndEncryption:(id)sender { if (sender && [sender isKindOfClass:UISwitch.class])