Enable draft restore (#2943)

This commit is contained in:
Mauro 2024-06-19 16:05:38 +02:00 committed by GitHub
parent b94111af26
commit 6655833719
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 1 additions and 14 deletions

View File

@ -44,7 +44,6 @@ final class AppSettings {
// Feature flags
case publicSearchEnabled
case draftRestoringEnabled
case fuzzyRoomListSearchEnabled
}
@ -271,9 +270,6 @@ final class AppSettings {
@UserPreference(key: UserDefaultsKeys.publicSearchEnabled, defaultValue: isDevelopmentBuild, storageType: .volatile)
var publicSearchEnabled
@UserPreference(key: UserDefaultsKeys.draftRestoringEnabled, defaultValue: false, storageType: .userDefaults(store))
var draftRestoringEnabled
@UserPreference(key: UserDefaultsKeys.fuzzyRoomListSearchEnabled, defaultValue: false, storageType: .userDefaults(store))
var fuzzyRoomListSearchEnabled

View File

@ -134,9 +134,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
// MARK: - Public
func loadDraft() {
guard appSettings.draftRestoringEnabled else {
return
}
actionsSubject.send(.composer(action: .loadDraft))
}

View File

@ -46,7 +46,6 @@ enum DeveloperOptionsScreenViewAction {
protocol DeveloperOptionsProtocol: AnyObject {
var logLevel: TracingConfiguration.LogLevel { get set }
var hideUnreadMessagesBadge: Bool { get set }
var draftRestoringEnabled: Bool { get set }
var elementCallBaseURL: URL { get set }
var fuzzyRoomListSearchEnabled: Bool { get set }
}

View File

@ -36,12 +36,6 @@ struct DeveloperOptionsScreen: View {
Text("Fuzzy searching")
}
}
Section("Room") {
Toggle(isOn: $context.draftRestoringEnabled) {
Text("Allow drafts to be restored")
}
}
Section("Element Call") {
TextField(context.elementCallBaseURL.absoluteString, text: $elementCallBaseURLString)

View File

@ -0,0 +1 @@
Draft restoring is enabled by default.