Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Room Notification Settings #3362

Closed
wants to merge 10 commits into from
4 changes: 3 additions & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ platform :ios, '10.0'
# Use frameforks to allow usage of pod written in Swift (like PiwikTracker)
use_frameworks!

# Suppress all warnings for now
inhibit_all_warnings!

# Different flavours of pods to MatrixKit
# The current MatrixKit pod version
$matrixKitVersion = '0.12.6'

# The develop branch version
#$matrixKitVersion = 'develop'
$matrixKitVersion = 'develop'

# The one used for developing both MatrixSDK and MatrixKit
# Note that MatrixSDK must be cloned into a folder called matrix-ios-sdk next to the MatrixKit folder
Expand Down
78 changes: 75 additions & 3 deletions Riot.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,16 @@
B1E5368D21FB7245001F3AFF /* KeyBackupRecoverFromPassphraseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1E5368C21FB7245001F3AFF /* KeyBackupRecoverFromPassphraseViewController.swift */; };
B1E5368F21FB7258001F3AFF /* KeyBackupRecoverFromPassphraseViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = B1E5368E21FB7258001F3AFF /* KeyBackupRecoverFromPassphraseViewController.storyboard */; };
B1FDF56021F5FE5500BA3834 /* KeyBackupSetupPassphraseViewAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1FDF55F21F5FE5500BA3834 /* KeyBackupSetupPassphraseViewAction.swift */; };
EC4968B224A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC4968AA24A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.swift */; };
EC4968B324A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC4968AB24A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.storyboard */; };
EC4968B424A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC4968AD24A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.swift */; };
EC4968B524A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC4968AE24A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.storyboard */; };
EC4968B624A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC4968B024A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.storyboard */; };
EC4968B724A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC4968B124A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.swift */; };
EC8B26BC24A4D8B300025FEA /* MXKTableViewCellWithLabelAndSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8B26BB24A4D8B300025FEA /* MXKTableViewCellWithLabelAndSwitch.swift */; };
EC8B26BE24A5131E00025FEA /* RoomNotificationSetting.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8B26BD24A5131E00025FEA /* RoomNotificationSetting.swift */; };
EC8B26C024A515A000025FEA /* MXRoom.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8B26BF24A515A000025FEA /* MXRoom.swift */; };
EC8B26C224A54DD900025FEA /* RiotTableViewHeaderFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC8B26C124A54DD900025FEA /* RiotTableViewHeaderFooterView.swift */; };
F05927C91FDED836009F2A68 /* MXGroup+Riot.m in Sources */ = {isa = PBXBuildFile; fileRef = F05927C71FDED835009F2A68 /* MXGroup+Riot.m */; };
F083BD1E1E7009ED00A9B29C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BB0D1E7009EC00A9B29C /* AppDelegate.m */; };
F083BDE61E7009ED00A9B29C /* busy.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = F083BBDB1E7009EC00A9B29C /* busy.mp3 */; };
Expand Down Expand Up @@ -1749,6 +1759,16 @@
B43DC75D1590BB8A4243BD4D /* Pods-RiotPods-Riot.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-Riot.release.xcconfig"; path = "Target Support Files/Pods-RiotPods-Riot/Pods-RiotPods-Riot.release.xcconfig"; sourceTree = "<group>"; };
BABB6681FBD79219B1213D6C /* Pods-RiotTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotTests.debug.xcconfig"; path = "Target Support Files/Pods-RiotTests/Pods-RiotTests.debug.xcconfig"; sourceTree = "<group>"; };
E2599D0ECB8DD206624E450B /* Pods-RiotPods-SiriIntents.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RiotPods-SiriIntents.release.xcconfig"; path = "Target Support Files/Pods-RiotPods-SiriIntents/Pods-RiotPods-SiriIntents.release.xcconfig"; sourceTree = "<group>"; };
EC4968AA24A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsHomeViewController.swift; sourceTree = "<group>"; };
EC4968AB24A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = RoomNotificationSettingsHomeViewController.storyboard; sourceTree = "<group>"; };
EC4968AD24A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsNotifyViewController.swift; sourceTree = "<group>"; };
EC4968AE24A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = RoomNotificationSettingsNotifyViewController.storyboard; sourceTree = "<group>"; };
EC4968B024A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = RoomNotificationSettingsSoundViewController.storyboard; sourceTree = "<group>"; };
EC4968B124A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoomNotificationSettingsSoundViewController.swift; sourceTree = "<group>"; };
EC8B26BB24A4D8B300025FEA /* MXKTableViewCellWithLabelAndSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MXKTableViewCellWithLabelAndSwitch.swift; sourceTree = "<group>"; };
EC8B26BD24A5131E00025FEA /* RoomNotificationSetting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoomNotificationSetting.swift; sourceTree = "<group>"; };
EC8B26BF24A515A000025FEA /* MXRoom.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MXRoom.swift; sourceTree = "<group>"; };
EC8B26C124A54DD900025FEA /* RiotTableViewHeaderFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RiotTableViewHeaderFooterView.swift; sourceTree = "<group>"; };
F05927C71FDED835009F2A68 /* MXGroup+Riot.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MXGroup+Riot.m"; sourceTree = "<group>"; };
F05927C81FDED835009F2A68 /* MXGroup+Riot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MXGroup+Riot.h"; sourceTree = "<group>"; };
F083BB031E7005FD00A9B29C /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2179,13 +2199,14 @@
name = Frameworks;
sourceTree = "<group>";
};
6E6F1CAE244DFB840068B78B /* SectionHeaders */ = {
6E6F1CAE244DFB840068B78B /* SectionHeaderFooters */ = {
isa = PBXGroup;
children = (
6E6F1CA8244DC1E90068B78B /* SectionHeaderView.h */,
6E6F1CA9244DC1E90068B78B /* SectionHeaderView.m */,
EC8B26C124A54DD900025FEA /* RiotTableViewHeaderFooterView.swift */,
);
path = SectionHeaders;
path = SectionHeaderFooters;
sourceTree = "<group>";
};
6E75C3E4245AF60500AF497D /* PushNotification */ = {
Expand Down Expand Up @@ -3071,6 +3092,7 @@
B1B5569020EE6C4C00210D55 /* Settings */ = {
isa = PBXGroup;
children = (
EC4968A824A38EF0004AE47B /* Notifications */,
B1B5569120EE6C4C00210D55 /* RoomSettingsViewController.h */,
B1B5569220EE6C4C00210D55 /* RoomSettingsViewController.m */,
B1B5592D20EF7BAC00210D55 /* Views */,
Expand Down Expand Up @@ -3246,7 +3268,7 @@
B1B556CD20EE6C4C00210D55 /* Common */ = {
isa = PBXGroup;
children = (
6E6F1CAE244DFB840068B78B /* SectionHeaders */,
6E6F1CAE244DFB840068B78B /* SectionHeaderFooters */,
B183226923F59F3E0035B2E8 /* Buttons */,
B1963B3622933B9500CBA17F /* CollectionView */,
B1B556CE20EE6C4C00210D55 /* WebViewController */,
Expand Down Expand Up @@ -4327,6 +4349,43 @@
path = Recover;
sourceTree = "<group>";
};
EC4968A824A38EF0004AE47B /* Notifications */ = {
isa = PBXGroup;
children = (
EC4968A924A38EF0004AE47B /* Home */,
EC4968AC24A38EF0004AE47B /* Notify */,
EC4968AF24A38EF0004AE47B /* Sound */,
);
path = Notifications;
sourceTree = "<group>";
};
EC4968A924A38EF0004AE47B /* Home */ = {
isa = PBXGroup;
children = (
EC4968AA24A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.swift */,
EC4968AB24A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.storyboard */,
);
path = Home;
sourceTree = "<group>";
};
EC4968AC24A38EF0004AE47B /* Notify */ = {
isa = PBXGroup;
children = (
EC4968AD24A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.swift */,
EC4968AE24A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.storyboard */,
);
path = Notify;
sourceTree = "<group>";
};
EC4968AF24A38EF0004AE47B /* Sound */ = {
isa = PBXGroup;
children = (
EC4968B024A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.storyboard */,
EC4968B124A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.swift */,
);
path = Sound;
sourceTree = "<group>";
};
F083BB021E7005FD00A9B29C /* RiotTests */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -4433,6 +4492,8 @@
6E6F1CB424506FA40068B78B /* UITableView.swift */,
B117E1F12453244B0089679F /* UILabel.swift */,
B1CA93752493CBF200575122 /* MXRecoveryService.swift */,
EC8B26BB24A4D8B300025FEA /* MXKTableViewCellWithLabelAndSwitch.swift */,
EC8B26BF24A515A000025FEA /* MXRoom.swift */,
);
path = Categories;
sourceTree = "<group>";
Expand All @@ -4454,6 +4515,7 @@
F083BBFD1E7009EC00A9B29C /* RoomPreviewData.h */,
F083BBFE1E7009EC00A9B29C /* RoomPreviewData.m */,
B1D44998243CD73700959523 /* RoomPowerLevel.swift */,
EC8B26BD24A5131E00025FEA /* RoomNotificationSetting.swift */,
);
path = Room;
sourceTree = "<group>";
Expand Down Expand Up @@ -4730,6 +4792,7 @@
B105778B221304FA00334B1E /* KeyBackupSetupSuccessFromPassphraseViewController.storyboard in Resources */,
B1664DA220F4F95800808783 /* Localizable.strings in Resources */,
B169328720F3954A00746532 /* SharedImages.xcassets in Resources */,
EC4968B524A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.storyboard in Resources */,
B1664DA120F4F94F00808783 /* InfoPlist.strings in Resources */,
B1B5579B20EF575B00210D55 /* AuthInputsView.xib in Resources */,
B1B5594620EF7BD000210D55 /* RoomCollectionViewCell.xib in Resources */,
Expand Down Expand Up @@ -4781,6 +4844,7 @@
B1550FCA2420E8F500CE097B /* QRCodeReaderViewController.storyboard in Resources */,
B1B5579C20EF575B00210D55 /* ForgotPasswordInputsView.xib in Resources */,
F083BE011E7009ED00A9B29C /* third_party_licenses.html in Resources */,
EC4968B324A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.storyboard in Resources */,
B1098BFC21ECFE65000DDA48 /* PasswordStrengthView.xib in Resources */,
B1B5573720EE6C4D00210D55 /* GroupParticipantsViewController.xib in Resources */,
B110872421F098F0003554A5 /* ActivityIndicatorView.xib in Resources */,
Expand Down Expand Up @@ -4860,6 +4924,7 @@
B1B557B320EF5AEF00210D55 /* EventDetailsView.xib in Resources */,
B1963B30228F1C4900CBA17F /* BubbleReactionsView.xib in Resources */,
B1B557DD20EF5FBB00210D55 /* FilesSearchTableViewCell.xib in Resources */,
EC4968B624A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.storyboard in Resources */,
B1B5590320EF768F00210D55 /* RoomSelectedStickerBubbleCell.xib in Resources */,
B1B5573F20EE6C4D00210D55 /* SegmentedViewController.xib in Resources */,
B1B5581E20EF625800210D55 /* RoomTitleView.xib in Resources */,
Expand Down Expand Up @@ -5094,6 +5159,7 @@
B1B5573A20EE6C4D00210D55 /* GroupRoomsViewController.m in Sources */,
B1B558F920EF768F00210D55 /* RoomOutgoingTextMsgWithoutSenderNameBubbleCell.m in Sources */,
B1FDF56021F5FE5500BA3834 /* KeyBackupSetupPassphraseViewAction.swift in Sources */,
EC4968B224A38EF0004AE47B /* RoomNotificationSettingsHomeViewController.swift in Sources */,
B1B5573120EE6C4D00210D55 /* BugReportViewController.m in Sources */,
324A2051225FC571004FE8B0 /* DeviceVerificationIncomingViewState.swift in Sources */,
B16932A520F3A21C00746532 /* empty.mm in Sources */,
Expand Down Expand Up @@ -5211,7 +5277,9 @@
B1B558E120EF768F00210D55 /* RoomMembershipCollapsedBubbleCell.m in Sources */,
B1B5571A20EE6C4D00210D55 /* SettingsViewController.m in Sources */,
B1CE9EFD22148703000FAE6A /* SignOutAlertPresenter.swift in Sources */,
EC8B26C024A515A000025FEA /* MXRoom.swift in Sources */,
32F6B9692270623100BBA352 /* KeyVerificationDataLoadingCoordinator.swift in Sources */,
EC8B26C224A54DD900025FEA /* RiotTableViewHeaderFooterView.swift in Sources */,
B157A7BA2445BD86008A5504 /* KeyVerificationScanConfirmationCoordinator.swift in Sources */,
B125FE1D231D5DE400B72806 /* SettingsDiscoveryViewModel.swift in Sources */,
32863A5A2384070300D07C4A /* RiotSharedSettings.swift in Sources */,
Expand Down Expand Up @@ -5252,6 +5320,7 @@
32DB557922FDADE50016329E /* ServiceTermsModalScreenViewModel.swift in Sources */,
B19C4E8B248F7A0E009A423F /* SecretsRecoveryWithPassphraseCoordinator.swift in Sources */,
32891D75226728EE00C82226 /* KeyVerificationDataLoadingViewController.swift in Sources */,
EC4968B724A38EF0004AE47B /* RoomNotificationSettingsSoundViewController.swift in Sources */,
B117E1F22453244B0089679F /* UILabel.swift in Sources */,
F083BDEF1E7009ED00A9B29C /* UINavigationController+Riot.m in Sources */,
B1B5581F20EF625800210D55 /* SimpleRoomTitleView.m in Sources */,
Expand Down Expand Up @@ -5337,6 +5406,7 @@
B1BEE71423DF2ACF0003A4CB /* UserVerificationCoordinatorType.swift in Sources */,
B1B5596F20EFA85D00210D55 /* EncryptionInfoView.m in Sources */,
B1B5573820EE6C4D00210D55 /* GroupParticipantsViewController.m in Sources */,
EC8B26BC24A4D8B300025FEA /* MXKTableViewCellWithLabelAndSwitch.swift in Sources */,
3232ABAB225730E100AD6A5C /* KeyVerificationCoordinator.swift in Sources */,
B1BEE73B23DF44A60003A4CB /* UserVerificationSessionsStatusCoordinator.swift in Sources */,
B1B5583E20EF6E7F00210D55 /* GroupRoomTableViewCell.m in Sources */,
Expand Down Expand Up @@ -5495,6 +5565,7 @@
B1DCC61822E5E17100625807 /* EmojiPickerViewState.swift in Sources */,
B1B336BF242B933700F95EC4 /* KeyVerificationSelfVerifyStartViewController.swift in Sources */,
B1CE83E32422817200D07506 /* VerifyEmojiCollectionViewCell.swift in Sources */,
EC4968B424A38EF0004AE47B /* RoomNotificationSettingsNotifyViewController.swift in Sources */,
B1C562DB228C0BB00037F12A /* RoomContextualMenuAction.swift in Sources */,
B1B5574720EE6C4D00210D55 /* UsersDevicesViewController.m in Sources */,
B1098BFF21ECFE65000DDA48 /* PasswordStrengthView.swift in Sources */,
Expand Down Expand Up @@ -5530,6 +5601,7 @@
B1E5368D21FB7245001F3AFF /* KeyBackupRecoverFromPassphraseViewController.swift in Sources */,
B1963B3822933BC800CBA17F /* AutosizedCollectionView.swift in Sources */,
B12D79FB23E2462200FACEDC /* UserVerificationStartCoordinator.swift in Sources */,
EC8B26BE24A5131E00025FEA /* RoomNotificationSetting.swift in Sources */,
B169330320F3C98900746532 /* RoomBubbleCellData.m in Sources */,
B1B336C3242B933700F95EC4 /* KeyVerificationSelfVerifyStartCoordinator.swift in Sources */,
B1B557CC20EF5D8000210D55 /* DirectoryServerTableViewCell.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Vector 26.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Vector [email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Vector [email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@
"identity_server_settings_alert_error_invalid_identity_server" = "%@ is not a valid identity server.";


// Room Details
// MARK: Room Details
"room_details_title" = "Room Details";
"room_details_people" = "Members";
"room_details_files" = "Files";
Expand All @@ -646,7 +646,7 @@
"room_details_topic" = "Topic";
"room_details_favourite_tag" = "Favourite";
"room_details_low_priority_tag" = "Low priority";
"room_details_mute_notifs" = "Mute notifications";
"room_details_notifications_row_title" = "Notifications";
"room_details_direct_chat" = "Direct Chat";
"room_details_access_section"="Who can access this room?";
"room_details_access_section_invited_only"="Only people who have been invited";
Expand Down Expand Up @@ -700,6 +700,9 @@
"room_details_copy_room_address" = "Copy Room Address";
"room_details_copy_room_url" = "Copy Room URL";

// Notifications
"room_notification_settings_home_title" = "Room Notifications";

// Group Details
"group_details_title" = "Community Details";
"group_details_home" = "Home";
Expand Down
28 changes: 28 additions & 0 deletions Riot/Categories/MXKTableViewCellWithLabelAndSwitch.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Copyright 2020 New Vector Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

import Foundation
import Reusable

extension MXKTableViewCellWithLabelAndSwitch: Reusable, Themable {

func update(theme: Theme) {
mxkLabel.textColor = theme.textPrimaryColor
backgroundColor = theme.backgroundColor
contentView.backgroundColor = .clear
}

}
Loading