mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Introduce a local mechanism for managing the app's badge count
This commit is contained in:
@@ -19,6 +19,7 @@ import SwiftUI
|
||||
nonisolated protocol CommonSettingsProtocol: AnyObject, Sendable {
|
||||
var lastNotificationBootTime: TimeInterval? { get set }
|
||||
var selectedNotificationTone: NotificationTone? { get set }
|
||||
var lastKnownBadgeCount: Int { get set }
|
||||
|
||||
var logLevel: LogLevel { get }
|
||||
var traceLogPacks: Set<TraceLogPack> { get }
|
||||
@@ -30,6 +31,7 @@ nonisolated protocol CommonSettingsProtocol: AnyObject, Sendable {
|
||||
var enableOnlySignedDeviceIsolationMode: Bool { get }
|
||||
var threadsEnabled: Bool { get }
|
||||
var hideQuietNotificationAlerts: Bool { get }
|
||||
var roomListNotificationCountEnabled: Bool { get }
|
||||
}
|
||||
|
||||
nonisolated enum AppBuildType {
|
||||
@@ -261,6 +263,10 @@ final nonisolated class AppSettings: @unchecked Sendable {
|
||||
@UserPreference
|
||||
var lastNotificationBootTime: TimeInterval?
|
||||
|
||||
/// The app icon badge value the app last computed from the SDK's unread notification counts.
|
||||
@UserPreference(defaultValue: 0)
|
||||
var lastKnownBadgeCount: Int
|
||||
|
||||
/// The sound played when delivering noisy notifications. If nil, use the ElementX default
|
||||
@UserPreference
|
||||
var selectedNotificationTone: NotificationTone?
|
||||
|
||||
Reference in New Issue
Block a user