mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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?";
|
"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_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";
|
"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_bullet_list" = "Toggle bullet list";
|
||||||
"rich_text_editor_code_block" = "Toggle code block";
|
"rich_text_editor_code_block" = "Toggle code block";
|
||||||
"rich_text_editor_composer_placeholder" = "Message…";
|
"rich_text_editor_composer_placeholder" = "Message…";
|
||||||
@@ -363,7 +364,7 @@
|
|||||||
"screen_waitlist_message_success" = "Welcome to %1$@!";
|
"screen_waitlist_message_success" = "Welcome to %1$@!";
|
||||||
"screen_waitlist_title" = "You’re almost there.";
|
"screen_waitlist_title" = "You’re almost there.";
|
||||||
"screen_waitlist_title_success" = "You're in.";
|
"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_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_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!";
|
"screen_welcome_button" = "Let's go!";
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ final class AppSettings {
|
|||||||
case shouldCollapseRoomStateEvents
|
case shouldCollapseRoomStateEvents
|
||||||
case userSuggestionsEnabled
|
case userSuggestionsEnabled
|
||||||
case readReceiptsEnabled
|
case readReceiptsEnabled
|
||||||
case locationEventsEnabled
|
|
||||||
case shareLocationEnabled
|
|
||||||
case hasShownWelcomeScreen
|
case hasShownWelcomeScreen
|
||||||
case notificationSettingsEnabled
|
case notificationSettingsEnabled
|
||||||
case timelineDiffableAnimationsEnabled
|
case timelineDiffableAnimationsEnabled
|
||||||
@@ -219,12 +217,6 @@ final class AppSettings {
|
|||||||
@UserPreference(key: UserDefaultsKeys.readReceiptsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
@UserPreference(key: UserDefaultsKeys.readReceiptsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||||
var readReceiptsEnabled
|
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))
|
@UserPreference(key: UserDefaultsKeys.notificationSettingsEnabled, defaultValue: false, storageType: .userDefaults(store))
|
||||||
var notificationSettingsEnabled
|
var notificationSettingsEnabled
|
||||||
|
|
||||||
|
|||||||
@@ -436,6 +436,8 @@ public enum L10n {
|
|||||||
public static var reportContentExplanation: String { return L10n.tr("Localizable", "report_content_explanation") }
|
public static var reportContentExplanation: String { return L10n.tr("Localizable", "report_content_explanation") }
|
||||||
/// Reason for reporting this content
|
/// Reason for reporting this content
|
||||||
public static var reportContentHint: String { return L10n.tr("Localizable", "report_content_hint") }
|
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
|
/// Toggle bullet list
|
||||||
public static var richTextEditorBulletList: String { return L10n.tr("Localizable", "rich_text_editor_bullet_list") }
|
public static var richTextEditorBulletList: String { return L10n.tr("Localizable", "rich_text_editor_bullet_list") }
|
||||||
/// Toggle code block
|
/// Toggle code block
|
||||||
@@ -920,7 +922,7 @@ public enum L10n {
|
|||||||
public static var screenWaitlistTitle: String { return L10n.tr("Localizable", "screen_waitlist_title") }
|
public static var screenWaitlistTitle: String { return L10n.tr("Localizable", "screen_waitlist_title") }
|
||||||
/// You're in.
|
/// You're in.
|
||||||
public static var screenWaitlistTitleSuccess: String { return L10n.tr("Localizable", "screen_waitlist_title_success") }
|
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") }
|
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.
|
/// 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") }
|
public static var screenWelcomeBullet2: String { return L10n.tr("Localizable", "screen_welcome_bullet_2") }
|
||||||
|
|||||||
@@ -54,13 +54,11 @@ struct RoomAttachmentPicker: View {
|
|||||||
PickerLabel(title: L10n.screenRoomAttachmentSourceCamera, icon: Image(systemName: "camera.fill"))
|
PickerLabel(title: L10n.screenRoomAttachmentSourceCamera, icon: Image(systemName: "camera.fill"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ServiceLocator.shared.settings.shareLocationEnabled {
|
Button {
|
||||||
Button {
|
context.showAttachmentPopover = false
|
||||||
context.showAttachmentPopover = false
|
context.send(viewAction: .displayLocationPicker)
|
||||||
context.send(viewAction: .displayLocationPicker)
|
} label: {
|
||||||
} label: {
|
PickerLabel(title: L10n.screenRoomAttachmentSourceLocation, icon: Image(asset: Asset.Images.locationPin))
|
||||||
PickerLabel(title: L10n.screenRoomAttachmentSourceLocation, icon: Image(asset: Asset.Images.locationPin))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.padding(.top, isPresented ? 20 : 0)
|
.padding(.top, isPresented ? 20 : 0)
|
||||||
|
|||||||
-4
@@ -29,8 +29,6 @@ struct DeveloperOptionsScreenViewStateBindings {
|
|||||||
var userSuggestionsEnabled: Bool
|
var userSuggestionsEnabled: Bool
|
||||||
var readReceiptsEnabled: Bool
|
var readReceiptsEnabled: Bool
|
||||||
var isEncryptionSyncEnabled: Bool
|
var isEncryptionSyncEnabled: Bool
|
||||||
var locationEventsEnabled: Bool
|
|
||||||
var shareLocationEnabled: Bool
|
|
||||||
var notificationSettingsEnabled: Bool
|
var notificationSettingsEnabled: Bool
|
||||||
var timelineDiffableAnimationsEnabled: Bool
|
var timelineDiffableAnimationsEnabled: Bool
|
||||||
}
|
}
|
||||||
@@ -40,8 +38,6 @@ enum DeveloperOptionsScreenViewAction {
|
|||||||
case changedUserSuggestionsEnabled
|
case changedUserSuggestionsEnabled
|
||||||
case changedReadReceiptsEnabled
|
case changedReadReceiptsEnabled
|
||||||
case changedIsEncryptionSyncEnabled
|
case changedIsEncryptionSyncEnabled
|
||||||
case changedLocationEventsEnabled
|
|
||||||
case changedShareLocationEnabled
|
|
||||||
case changedNotificationSettingsEnabled
|
case changedNotificationSettingsEnabled
|
||||||
case changedTimelineDiffableAnimationsEnabled
|
case changedTimelineDiffableAnimationsEnabled
|
||||||
case clearCache
|
case clearCache
|
||||||
|
|||||||
-6
@@ -30,8 +30,6 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
|
|||||||
userSuggestionsEnabled: appSettings.userSuggestionsEnabled,
|
userSuggestionsEnabled: appSettings.userSuggestionsEnabled,
|
||||||
readReceiptsEnabled: appSettings.readReceiptsEnabled,
|
readReceiptsEnabled: appSettings.readReceiptsEnabled,
|
||||||
isEncryptionSyncEnabled: appSettings.isEncryptionSyncEnabled,
|
isEncryptionSyncEnabled: appSettings.isEncryptionSyncEnabled,
|
||||||
locationEventsEnabled: appSettings.locationEventsEnabled,
|
|
||||||
shareLocationEnabled: appSettings.shareLocationEnabled,
|
|
||||||
notificationSettingsEnabled: appSettings.notificationSettingsEnabled,
|
notificationSettingsEnabled: appSettings.notificationSettingsEnabled,
|
||||||
timelineDiffableAnimationsEnabled: appSettings.timelineDiffableAnimationsEnabled)
|
timelineDiffableAnimationsEnabled: appSettings.timelineDiffableAnimationsEnabled)
|
||||||
let state = DeveloperOptionsScreenViewState(bindings: bindings)
|
let state = DeveloperOptionsScreenViewState(bindings: bindings)
|
||||||
@@ -53,10 +51,6 @@ class DeveloperOptionsScreenViewModel: DeveloperOptionsScreenViewModelType, Deve
|
|||||||
appSettings.readReceiptsEnabled = state.bindings.readReceiptsEnabled
|
appSettings.readReceiptsEnabled = state.bindings.readReceiptsEnabled
|
||||||
case .changedIsEncryptionSyncEnabled:
|
case .changedIsEncryptionSyncEnabled:
|
||||||
appSettings.isEncryptionSyncEnabled = state.bindings.isEncryptionSyncEnabled
|
appSettings.isEncryptionSyncEnabled = state.bindings.isEncryptionSyncEnabled
|
||||||
case .changedLocationEventsEnabled:
|
|
||||||
appSettings.locationEventsEnabled = state.bindings.locationEventsEnabled
|
|
||||||
case .changedShareLocationEnabled:
|
|
||||||
appSettings.shareLocationEnabled = state.bindings.shareLocationEnabled
|
|
||||||
case .changedNotificationSettingsEnabled:
|
case .changedNotificationSettingsEnabled:
|
||||||
appSettings.notificationSettingsEnabled = state.bindings.notificationSettingsEnabled
|
appSettings.notificationSettingsEnabled = state.bindings.notificationSettingsEnabled
|
||||||
case .changedTimelineDiffableAnimationsEnabled:
|
case .changedTimelineDiffableAnimationsEnabled:
|
||||||
|
|||||||
-16
@@ -56,22 +56,6 @@ struct DeveloperOptionsScreen: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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") {
|
Section("Room creation") {
|
||||||
Toggle(isOn: $context.userSuggestionsEnabled) {
|
Toggle(isOn: $context.userSuggestionsEnabled) {
|
||||||
Text("User suggestions")
|
Text("User suggestions")
|
||||||
|
|||||||
@@ -75,9 +75,6 @@ struct RoomTimelineItemFactory: RoomTimelineItemFactoryProtocol {
|
|||||||
case .audio(let content):
|
case .audio(let content):
|
||||||
return buildAudioTimelineItem(for: eventItemProxy, messageTimelineItem, content, isOutgoing)
|
return buildAudioTimelineItem(for: eventItemProxy, messageTimelineItem, content, isOutgoing)
|
||||||
case .location(let content):
|
case .location(let content):
|
||||||
guard ServiceLocator.shared.settings.locationEventsEnabled else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return buildLocationTimelineItem(for: eventItemProxy, messageTimelineItem, content, isOutgoing)
|
return buildLocationTimelineItem(for: eventItemProxy, messageTimelineItem, content, isOutgoing)
|
||||||
case .none:
|
case .none:
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Location sharing: view and send static locations.
|
||||||
Reference in New Issue
Block a user