From 95f3edac7f7886b81f62fdb3b04c91145d442a6f Mon Sep 17 00:00:00 2001 From: Mauro Romito Date: Wed, 8 Apr 2026 11:13:13 +0200 Subject: [PATCH] floating date feature is now out of the feature flag --- ElementX/Sources/Application/Settings/AppSettings.swift | 4 ---- ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift | 2 +- .../DeveloperOptionsScreenModels.swift | 4 +--- .../View/DeveloperOptionsScreen.swift | 5 ----- .../ThreadTimelineScreen/View/ThreadTimelineScreen.swift | 6 ++---- ElementX/Sources/Screens/Timeline/TimelineModels.swift | 4 +--- ElementX/Sources/Screens/Timeline/TimelineViewModel.swift | 1 - 7 files changed, 5 insertions(+), 21 deletions(-) diff --git a/ElementX/Sources/Application/Settings/AppSettings.swift b/ElementX/Sources/Application/Settings/AppSettings.swift index af4b5d48f..c183da18c 100644 --- a/ElementX/Sources/Application/Settings/AppSettings.swift +++ b/ElementX/Sources/Application/Settings/AppSettings.swift @@ -81,7 +81,6 @@ final class AppSettings { case focusEventOnNotificationTap case linkNewDeviceEnabled case liveLocationSharingEnabled - case floatingTimelineDateEnabled // Doug's tweaks 🔧 case hideUnreadMessagesBadge @@ -450,9 +449,6 @@ final class AppSettings { @UserPreference(key: UserDefaultsKeys.liveLocationSharingEnabled, defaultValue: false, storageType: .userDefaults(store)) var liveLocationSharingEnabled - @UserPreference(key: UserDefaultsKeys.floatingTimelineDateEnabled, defaultValue: false, storageType: .userDefaults(store)) - var floatingTimelineDateEnabled - @UserPreference(key: UserDefaultsKeys.developerOptionsEnabled, defaultValue: appBuildType == .debug, storageType: .userDefaults(store)) var developerOptionsEnabled } diff --git a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift index 88e46d896..e5269331d 100644 --- a/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift +++ b/ElementX/Sources/Screens/RoomScreen/View/RoomScreen.swift @@ -92,7 +92,7 @@ struct RoomScreen: View { @ViewBuilder private var dateBadge: some View { - if timelineContext.viewState.floatingTimelineDateEnabled, !isVoiceOverEnabled { + if !isVoiceOverEnabled { FloatingDateBadge(dateText: timelineContext.floatingDateText) } } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift index 00bf01681..f6c6bab3a 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/DeveloperOptionsScreenModels.swift @@ -69,9 +69,7 @@ protocol DeveloperOptionsProtocol: AnyObject { var linkNewDeviceEnabled: Bool { get set } var liveLocationSharingEnabled: Bool { get set } - - var floatingTimelineDateEnabled: Bool { get set } - + var roomThreadListEnabled: Bool { get set } } diff --git a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift index 454c49384..eebaead6b 100644 --- a/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift +++ b/ElementX/Sources/Screens/Settings/DeveloperOptionsScreen/View/DeveloperOptionsScreen.swift @@ -84,11 +84,6 @@ struct DeveloperOptionsScreen: View { Toggle(isOn: $context.liveLocationSharingEnabled) { Text("Live location sharing") } - - Toggle(isOn: $context.floatingTimelineDateEnabled) { - Text("Floating timeline date") - Text("Shows a floating date badge while scrolling the timeline.") - } Toggle(isOn: $context.knockingEnabled) { Text("Knocking") diff --git a/ElementX/Sources/Screens/ThreadTimelineScreen/View/ThreadTimelineScreen.swift b/ElementX/Sources/Screens/ThreadTimelineScreen/View/ThreadTimelineScreen.swift index 9874babae..2d212ed36 100644 --- a/ElementX/Sources/Screens/ThreadTimelineScreen/View/ThreadTimelineScreen.swift +++ b/ElementX/Sources/Screens/ThreadTimelineScreen/View/ThreadTimelineScreen.swift @@ -32,10 +32,8 @@ struct ThreadTimelineScreen: View { .toolbarBackground(.visible, for: .navigationBar) // Fix the toolbar's background. .timelineMediaPreview(viewModel: $context.mediaPreviewViewModel) .overlay(alignment: .top) { - if timelineContext.viewState.floatingTimelineDateEnabled { - FloatingDateBadge(dateText: timelineContext.floatingDateText) - .padding(.top, 13) - } + FloatingDateBadge(dateText: timelineContext.floatingDateText) + .padding(.top, 13) } .overlay(alignment: .bottomTrailing) { TimelineScrollToBottomButton(isVisible: isAtBottomAndLive) { diff --git a/ElementX/Sources/Screens/Timeline/TimelineModels.swift b/ElementX/Sources/Screens/Timeline/TimelineModels.swift index 8083e95d1..f1711a69f 100644 --- a/ElementX/Sources/Screens/Timeline/TimelineModels.swift +++ b/ElementX/Sources/Screens/Timeline/TimelineModels.swift @@ -143,9 +143,7 @@ struct TimelineViewState: BindableState { var mapTilerConfiguration: MapTilerConfiguration var enableKeyShareOnInvite: Bool - - var floatingTimelineDateEnabled: Bool - + var bindings: TimelineViewStateBindings } diff --git a/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift b/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift index 439a1d2d2..4320da23c 100644 --- a/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift +++ b/ElementX/Sources/Screens/Timeline/TimelineViewModel.swift @@ -108,7 +108,6 @@ class TimelineViewModel: TimelineViewModelType, TimelineViewModelProtocol { linkMetadataProvider: hideTimelineMedia ? nil : linkMetadataProvider, mapTilerConfiguration: appSettings.mapTilerConfiguration, enableKeyShareOnInvite: appSettings.enableKeyShareOnInvite, - floatingTimelineDateEnabled: appSettings.floatingTimelineDateEnabled, bindings: .init(reactionsCollapsed: [:])), mediaProvider: userSession.mediaProvider)