mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 08:15:24 +00:00
ac29354b08
* Remove the now unused setting to disable in-app notifications. * Move visible account settings into AccountSettings. Have ignored enableNotifications for now as that will require reworking the NotificationManager. * Allow different sounds to be selected for each account. * Move defaultNotificationTone into AccountSettings.
45 lines
1.2 KiB
Swift
45 lines
1.2 KiB
Swift
//
|
|
// Copyright 2026 Element Creations Ltd.
|
|
//
|
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
// Please see LICENSE files in the repository root for full details.
|
|
//
|
|
|
|
import Foundation
|
|
import UIKit
|
|
|
|
enum ModerationAndSafetySettingsScreenViewModelAction {
|
|
case blockedUsers
|
|
}
|
|
|
|
struct ModerationAndSafetySettingsScreenViewState: BindableState {
|
|
var hideInviteAvatars: Bool
|
|
var isWaitingHideInviteAvatars = false
|
|
|
|
var timelineMediaVisibility: TimelineMediaVisibility
|
|
var isWaitingTimelineMediaVisibility = false
|
|
|
|
var showBlockedUsers = false
|
|
|
|
var bindings: ModerationAndSafetySettingsScreenViewStateBindings
|
|
}
|
|
|
|
struct ModerationAndSafetySettingsScreenViewStateBindings {
|
|
private let userSettings: UserSettings
|
|
|
|
init(userSettings: UserSettings) {
|
|
self.userSettings = userSettings
|
|
}
|
|
|
|
var sharePresence: Bool {
|
|
get { userSettings.account.sharePresence }
|
|
set { userSettings.account.sharePresence = newValue }
|
|
}
|
|
}
|
|
|
|
enum ModerationAndSafetySettingsScreenViewAction {
|
|
case updateHideInviteAvatars(Bool)
|
|
case updateTimelineMediaVisibility(TimelineMediaVisibility)
|
|
case blockedUsers
|
|
}
|