mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Add a "Mute" shortcut and a "Notifications" section in the room details screen #1318
This commit is contained in:
@@ -357,6 +357,13 @@ class ClientProxy: ClientProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func notificationSettings() async -> NotificationSettingsProxyProtocol {
|
||||
await Task.dispatch(on: clientQueue) {
|
||||
NotificationSettingsProxy(notificationSettings: self.client.getNotificationSettings(),
|
||||
backgroundTaskService: self.backgroundTaskService)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private func restartSync(delay: Duration = .zero) {
|
||||
|
||||
@@ -113,4 +113,6 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
func searchUsers(searchTerm: String, limit: UInt) async -> Result<SearchUsersResultsProxy, ClientProxyError>
|
||||
|
||||
func profile(for userID: String) async -> Result<UserProfileProxy, ClientProxyError>
|
||||
|
||||
func notificationSettings() async -> NotificationSettingsProxyProtocol
|
||||
}
|
||||
|
||||
@@ -140,4 +140,13 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
getProfileCalled = true
|
||||
return getProfileResult
|
||||
}
|
||||
|
||||
var notificationSettingsResult: NotificationSettingsProxyProtocol?
|
||||
func notificationSettings() -> NotificationSettingsProxyProtocol {
|
||||
if let notificationSettingsResult {
|
||||
return notificationSettingsResult
|
||||
} else {
|
||||
return NotificationSettingsProxyMock(with: .init())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user