mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
FF to enable/disable focussing the event on notification tap
This commit is contained in:
@@ -347,6 +347,7 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let eventID = appSettings.focusEventOnNotificationTap ? content.eventID : nil
|
||||||
if content.categoryIdentifier == NotificationConstants.Category.invite {
|
if content.categoryIdentifier == NotificationConstants.Category.invite {
|
||||||
if let userSession {
|
if let userSession {
|
||||||
userSession.clientProxy.roomsToAwait.insert(roomID)
|
userSession.clientProxy.roomsToAwait.insert(roomID)
|
||||||
@@ -355,8 +356,8 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg
|
|||||||
}
|
}
|
||||||
handleAppRoute(.room(roomID: roomID, via: []))
|
handleAppRoute(.room(roomID: roomID, via: []))
|
||||||
} else if appSettings.threadsEnabled, let threadRootEventID = content.threadRootEventID {
|
} else if appSettings.threadsEnabled, let threadRootEventID = content.threadRootEventID {
|
||||||
handleAppRoute(.thread(roomID: roomID, threadRootEventID: threadRootEventID, focusEventID: content.eventID))
|
handleAppRoute(.thread(roomID: roomID, threadRootEventID: threadRootEventID, focusEventID: eventID))
|
||||||
} else if let eventID = content.eventID {
|
} else if let eventID {
|
||||||
handleAppRoute(.event(eventID: eventID, roomID: roomID, via: []))
|
handleAppRoute(.event(eventID: eventID, roomID: roomID, via: []))
|
||||||
} else {
|
} else {
|
||||||
handleAppRoute(.room(roomID: roomID, via: []))
|
handleAppRoute(.room(roomID: roomID, via: []))
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ final class AppSettings {
|
|||||||
case linkPreviewsEnabled
|
case linkPreviewsEnabled
|
||||||
case latestEventSorterEnabled
|
case latestEventSorterEnabled
|
||||||
case spaceSettingsEnabled
|
case spaceSettingsEnabled
|
||||||
|
case focusEventOnNotificationTap
|
||||||
|
|
||||||
// Doug's tweaks 🔧
|
// Doug's tweaks 🔧
|
||||||
case hideUnreadMessagesBadge
|
case hideUnreadMessagesBadge
|
||||||
@@ -390,6 +391,9 @@ final class AppSettings {
|
|||||||
@UserPreference(key: UserDefaultsKeys.threadsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
@UserPreference(key: UserDefaultsKeys.threadsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||||
var threadsEnabled
|
var threadsEnabled
|
||||||
|
|
||||||
|
@UserPreference(key: UserDefaultsKeys.focusEventOnNotificationTap, defaultValue: false, storageType: .userDefaults(store))
|
||||||
|
var focusEventOnNotificationTap
|
||||||
|
|
||||||
@UserPreference(key: UserDefaultsKeys.spaceSettingsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
@UserPreference(key: UserDefaultsKeys.spaceSettingsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||||
var spaceSettingsEnabled
|
var spaceSettingsEnabled
|
||||||
|
|
||||||
|
|||||||
+1
@@ -43,6 +43,7 @@ protocol DeveloperOptionsProtocol: AnyObject {
|
|||||||
var enableOnlySignedDeviceIsolationMode: Bool { get set }
|
var enableOnlySignedDeviceIsolationMode: Bool { get set }
|
||||||
var enableKeyShareOnInvite: Bool { get set }
|
var enableKeyShareOnInvite: Bool { get set }
|
||||||
var hideQuietNotificationAlerts: Bool { get set }
|
var hideQuietNotificationAlerts: Bool { get set }
|
||||||
|
var focusEventOnNotificationTap: Bool { get set }
|
||||||
|
|
||||||
var hideUnreadMessagesBadge: Bool { get set }
|
var hideUnreadMessagesBadge: Bool { get set }
|
||||||
var elementCallBaseURLOverride: URL? { get set }
|
var elementCallBaseURLOverride: URL? { get set }
|
||||||
|
|||||||
+3
@@ -121,6 +121,9 @@ struct DeveloperOptionsScreen: View {
|
|||||||
Text("Hide quiet alerts")
|
Text("Hide quiet alerts")
|
||||||
Text("The badge count will still be updated")
|
Text("The badge count will still be updated")
|
||||||
}
|
}
|
||||||
|
Toggle(isOn: $context.focusEventOnNotificationTap) {
|
||||||
|
Text("Focus event on notification tap")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
|
|||||||
Reference in New Issue
Block a user