From 02e632aae4ec35b64c7b2c320693c86dfe4436cf Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Tue, 11 Oct 2022 11:30:10 +1100 Subject: [PATCH 1/2] Fixed a couple of bugs with the release Fixed a bug where you couldn't start a conversation with an ONS Fixed a bug where some dropdown settings wouldn't refresh their UI when returning from an update via a child screen --- Session/Home/New Conversation/NewDMVC.swift | 2 +- .../NotificationSettingsViewModel.swift | 17 +++++------- .../Shared/Types/SessionCell+Accessory.swift | 26 ------------------- 3 files changed, 8 insertions(+), 37 deletions(-) diff --git a/Session/Home/New Conversation/NewDMVC.swift b/Session/Home/New Conversation/NewDMVC.swift index 6db28a78f..6e9bd16ba 100644 --- a/Session/Home/New Conversation/NewDMVC.swift +++ b/Session/Home/New Conversation/NewDMVC.swift @@ -238,7 +238,7 @@ private final class EnterPublicKeyVC: UIViewController { private lazy var publicKeyTextView: TextView = { let result = TextView(placeholder: "vc_enter_public_key_text_field_hint".localized()) { [weak self] text in - self?.nextButton.isEnabled = (SessionId(from: text) != nil) + self?.nextButton.isEnabled = !text.isEmpty } result.autocapitalizationType = .none diff --git a/Session/Settings/NotificationSettingsViewModel.swift b/Session/Settings/NotificationSettingsViewModel.swift index bbf17b534..081582582 100644 --- a/Session/Settings/NotificationSettingsViewModel.swift +++ b/Session/Settings/NotificationSettingsViewModel.swift @@ -56,6 +56,11 @@ class NotificationSettingsViewModel: SessionTableViewModel [SectionModel] in + let notificationSound: Preferences.Sound = db[.defaultNotificationSound] + .defaulting(to: Preferences.Sound.defaultNotificationSound) + let previewType: Preferences.NotificationPreviewType = db[.preferencesNotificationPreviewType] + .defaulting(to: Preferences.NotificationPreviewType.defaultPreviewType) + return [ SectionModel( model: .strategy, @@ -90,11 +95,7 @@ class NotificationSettingsViewModel: SessionTableViewModel( - type: ET.Type, - key: Setting.EnumKey, - value: @escaping ((ET?) -> String?) - ) -> DataSource { - return .dynamicString { - let currentValue: ET? = Storage.shared[key] - - return value(currentValue) - } - } - - public static func dynamicString( - type: ET.Type, - key: Setting.EnumKey, - value: @escaping ((ET?) -> String?) - ) -> DataSource { - return .dynamicString { - let currentValue: ET? = Storage.shared[key] - - return value(currentValue) - } - } - // MARK: - Convenience public var currentBoolValue: Bool { From 73bd4011a44a7544c9a409360fccdc71f08365ab Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Tue, 11 Oct 2022 11:47:42 +1100 Subject: [PATCH 2/2] Increased build number --- Session.xcodeproj/project.pbxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index ebfd2189a..f43e8ea27 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -6020,7 +6020,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 380; + CURRENT_PROJECT_VERSION = 383; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -6093,7 +6093,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 380; + CURRENT_PROJECT_VERSION = 383; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; ENABLE_NS_ASSERTIONS = NO; @@ -6159,7 +6159,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 380; + CURRENT_PROJECT_VERSION = 383; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; @@ -6233,7 +6233,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 380; + CURRENT_PROJECT_VERSION = 383; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = SUQ8J2PCT7; ENABLE_NS_ASSERTIONS = NO; @@ -7161,7 +7161,7 @@ CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 380; + CURRENT_PROJECT_VERSION = 383; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", @@ -7233,7 +7233,7 @@ CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 380; + CURRENT_PROJECT_VERSION = 383; DEVELOPMENT_TEAM = SUQ8J2PCT7; FRAMEWORK_SEARCH_PATHS = ( "$(inherited)",