mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Delete Location Sharing feature flags (#1358)
* Delete location sharing feature flags * Add changelog.d file * Update localizations * Amend changelog file
This commit is contained in:
@@ -175,6 +175,7 @@
|
||||
"rageshake_dialog_content" = "You seem to be shaking the phone in frustration. Would you like to open the bug report screen?";
|
||||
"report_content_explanation" = "This message will be reported to your homeserver’s administrator. They will not be able to read any encrypted messages.";
|
||||
"report_content_hint" = "Reason for reporting this content";
|
||||
"rich_text_editor_a11y_add_attachment" = "Add attachment";
|
||||
"rich_text_editor_bullet_list" = "Toggle bullet list";
|
||||
"rich_text_editor_code_block" = "Toggle code block";
|
||||
"rich_text_editor_composer_placeholder" = "Message…";
|
||||
@@ -363,7 +364,7 @@
|
||||
"screen_waitlist_message_success" = "Welcome to %1$@!";
|
||||
"screen_waitlist_title" = "You’re almost there.";
|
||||
"screen_waitlist_title_success" = "You're in.";
|
||||
"screen_welcome_bullet_1" = "Calls, location sharing, search and more will be added later this year.";
|
||||
"screen_welcome_bullet_1" = "Calls, polls, search and more will be added later this year.";
|
||||
"screen_welcome_bullet_2" = "Message history for encrypted rooms won’t be available in this update.";
|
||||
"screen_welcome_bullet_3" = "We’d love to hear from you, let us know what you think via the settings page.";
|
||||
"screen_welcome_button" = "Let's go!";
|
||||
|
||||
@@ -32,8 +32,6 @@ final class AppSettings {
|
||||
case shouldCollapseRoomStateEvents
|
||||
case userSuggestionsEnabled
|
||||
case readReceiptsEnabled
|
||||
case locationEventsEnabled
|
||||
case shareLocationEnabled
|
||||
case hasShownWelcomeScreen
|
||||
case notificationSettingsEnabled
|
||||
case timelineDiffableAnimationsEnabled
|
||||
@@ -218,12 +216,6 @@ final class AppSettings {
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.readReceiptsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var readReceiptsEnabled
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.locationEventsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var locationEventsEnabled
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.shareLocationEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var shareLocationEnabled
|
||||
|
||||
@UserPreference(key: UserDefaultsKeys.notificationSettingsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||
var notificationSettingsEnabled
|
||||
|
||||
@@ -436,6 +436,8 @@ public enum L10n {
|
||||
public static var reportContentExplanation: String { return L10n.tr("Localizable", "report_content_explanation") }
|
||||
/// Reason for reporting this content
|
||||
public static var reportContentHint: String { return L10n.tr("Localizable", "report_content_hint") }
|
||||
/// Add attachment
|
||||
public static var richTextEditorA11yAddAttachment: String { return L10n.tr("Localizable", "rich_text_editor_a11y_add_attachment") }
|
||||
/// Toggle bullet list
|
||||
public static var richTextEditorBulletList: String { return L10n.tr("Localizable", "rich_text_editor_bullet_list") }
|
||||
/// Toggle code block
|
||||
@@ -920,7 +922,7 @@ public enum L10n {
|
||||
public static var screenWaitlistTitle: String { return L10n.tr("Localizable", "screen_waitlist_title") }
|
||||
/// You're in.
|
||||
public static var screenWaitlistTitleSuccess: String { return L10n.tr("Localizable", "screen_waitlist_title_success") }
|
||||
/// Calls, location sharing, search and more will be added later this year.
|
||||
/// Calls, polls, search and more will be added later this year.
|
||||
public static var screenWelcomeBullet1: String { return L10n.tr("Localizable", "screen_welcome_bullet_1") }
|
||||
/// Message history for encrypted rooms won’t be available in this update.
|
||||
public static var screenWelcomeBullet2: String { return L10n.tr("Localizable", "screen_welcome_bullet_2") }
|
||||
|
||||
@@ -53,14 +53,12 @@ struct RoomAttachmentPicker: View {
|
||||
} label: {
|
||||
PickerLabel(title: L10n.screenRoomAttachmentSourceCamera, icon: Image(systemName: "camera.fill"))
|
||||
}
|
||||
|
||||
if ServiceLocator.shared.settings.shareLocationEnabled {
|
||||
Button {
|
||||
context.showAttachmentPopover = false
|
||||
context.send(viewAction: .displayLocationPicker)
|
||||
} label: {
|
||||
PickerLabel(title: L10n.screenRoomAttachmentSourceLocation, icon: Image(asset: Asset.Images.locationPin))
|
||||
}
|
||||
|
||||
Button {
|
||||
context.showAttachmentPopover = false
|
||||
context.send(viewAction: .displayLocationPicker)
|
||||
} label: {
|
||||
PickerLabel(title: L10n.screenRoomAttachmentSourceLocation, icon: Image(asset: Asset.Images.locationPin))
|
||||
}
|
||||
}
|
||||
.padding(.top, isPresented ? 20 : 0)
|
||||
|
||||
-4
@@ -29,8 +29,6 @@ struct DeveloperOptionsScreenViewStateBindings {
|
||||
var userSuggestionsEnabled: Bool
|
||||
var readReceiptsEnabled: Bool
|
||||
var isEncryptionSyncEnabled: Bool
|
||||
var locationEventsEnabled: Bool
|
||||
var shareLocationEnabled: Bool
|
||||
var notificationSettingsEnabled: Bool
|
||||
var timelineDiffableAnimationsEnabled: Bool
|
||||
}
|
||||
@@ -40,8 +38,6 @@ enum DeveloperOptionsScreenViewAction {
|
||||
case changedUserSuggestionsEnabled
|
||||
case changedReadReceiptsEnabled
|
||||
case changedIsEncryptionSyncEnabled
|
||||
case changedLocationEventsEnabled
|
||||
case changedShareLocationEnabled
|
||||
case changedNotificationSettingsEnabled
|
||||
case changedTimelineDiffableAnimationsEnabled
|
||||
case clearCache
|
||||
|
||||
-6
@@ -30,8 +30,6 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
|
||||
userSuggestionsEnabled: appSettings.userSuggestionsEnabled,
|
||||
readReceiptsEnabled: appSettings.readReceiptsEnabled,
|
||||
isEncryptionSyncEnabled: appSettings.isEncryptionSyncEnabled,
|
||||
locationEventsEnabled: appSettings.locationEventsEnabled,
|
||||
shareLocationEnabled: appSettings.shareLocationEnabled,
|
||||
notificationSettingsEnabled: appSettings.notificationSettingsEnabled,
|
||||
timelineDiffableAnimationsEnabled: appSettings.timelineDiffableAnimationsEnabled)
|
||||
let state = DeveloperOptionsScreenViewState(bindings: bindings)
|
||||
@@ -53,10 +51,6 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
|
||||
appSettings.readReceiptsEnabled = state.bindings.readReceiptsEnabled
|
||||
case .changedIsEncryptionSyncEnabled:
|
||||
appSettings.isEncryptionSyncEnabled = state.bindings.isEncryptionSyncEnabled
|
||||
case .changedLocationEventsEnabled:
|
||||
appSettings.locationEventsEnabled = state.bindings.locationEventsEnabled
|
||||
case .changedShareLocationEnabled:
|
||||
appSettings.shareLocationEnabled = state.bindings.shareLocationEnabled
|
||||
case .changedNotificationSettingsEnabled:
|
||||
appSettings.notificationSettingsEnabled = state.bindings.notificationSettingsEnabled
|
||||
case .changedTimelineDiffableAnimationsEnabled:
|
||||
|
||||
+7
-23
@@ -19,7 +19,7 @@ import SwiftUI
|
||||
struct DeveloperOptionsScreen: View {
|
||||
@ObservedObject var context: DeveloperOptionsScreenViewModel.Context
|
||||
@State private var showConfetti = false
|
||||
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
Section("Timeline") {
|
||||
@@ -38,7 +38,7 @@ struct DeveloperOptionsScreen: View {
|
||||
context.send(viewAction: .changedReadReceiptsEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Section("Notifications") {
|
||||
Toggle(isOn: $context.isEncryptionSyncEnabled) {
|
||||
Text("Use notification encryption sync")
|
||||
@@ -55,23 +55,7 @@ struct DeveloperOptionsScreen: View {
|
||||
context.send(viewAction: .changedNotificationSettingsEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
Section("Location sharing") {
|
||||
Toggle(isOn: $context.locationEventsEnabled) {
|
||||
Text("Location events in timeline")
|
||||
}
|
||||
.onChange(of: context.locationEventsEnabled) { _ in
|
||||
context.send(viewAction: .changedLocationEventsEnabled)
|
||||
}
|
||||
|
||||
Toggle(isOn: $context.shareLocationEnabled) {
|
||||
Text("Show share location action")
|
||||
}
|
||||
.onChange(of: context.shareLocationEnabled) { _ in
|
||||
context.send(viewAction: .changedShareLocationEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Section("Room creation") {
|
||||
Toggle(isOn: $context.userSuggestionsEnabled) {
|
||||
Text("User suggestions")
|
||||
@@ -87,7 +71,7 @@ struct DeveloperOptionsScreen: View {
|
||||
context.send(viewAction: .changedTimelineDiffableAnimationsEnabled)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Section {
|
||||
Button {
|
||||
showConfetti = true
|
||||
@@ -104,7 +88,7 @@ struct DeveloperOptionsScreen: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Section {
|
||||
Button(role: .destructive) {
|
||||
context.send(viewAction: .clearCache)
|
||||
@@ -119,7 +103,7 @@ struct DeveloperOptionsScreen: View {
|
||||
.navigationTitle(L10n.commonDeveloperOptions)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
|
||||
|
||||
@ViewBuilder
|
||||
private var effectsView: some View {
|
||||
if showConfetti {
|
||||
@@ -129,7 +113,7 @@ struct DeveloperOptionsScreen: View {
|
||||
.task { await removeConfettiAfterDelay() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private func removeConfettiAfterDelay() async {
|
||||
try? await Task.sleep(for: .seconds(4))
|
||||
showConfetti = false
|
||||
|
||||
@@ -75,9 +75,6 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
||||
case .audio(let content):
|
||||
return buildAudioTimelineItem(for: eventItemProxy, messageTimelineItem, content, isOutgoing)
|
||||
case .location(let content):
|
||||
guard ServiceLocator.shared.settings.locationEventsEnabled else {
|
||||
return nil
|
||||
}
|
||||
return buildLocationTimelineItem(for: eventItemProxy, messageTimelineItem, content, isOutgoing)
|
||||
case .none:
|
||||
return nil
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Location sharing: view and send static locations.
|
||||
Reference in New Issue
Block a user