mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Merge branch 'dev' into ipad-landscape-support
This commit is contained in:
commit
9a5c7632c7
|
@ -6020,7 +6020,7 @@
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 380;
|
CURRENT_PROJECT_VERSION = 383;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
||||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||||
|
@ -6093,7 +6093,7 @@
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 380;
|
CURRENT_PROJECT_VERSION = 383;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
@ -6159,7 +6159,7 @@
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 380;
|
CURRENT_PROJECT_VERSION = 383;
|
||||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||||
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
||||||
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
|
||||||
|
@ -6233,7 +6233,7 @@
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
COPY_PHASE_STRIP = NO;
|
COPY_PHASE_STRIP = NO;
|
||||||
CURRENT_PROJECT_VERSION = 380;
|
CURRENT_PROJECT_VERSION = 383;
|
||||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||||
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
||||||
ENABLE_NS_ASSERTIONS = NO;
|
ENABLE_NS_ASSERTIONS = NO;
|
||||||
|
@ -7161,7 +7161,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CURRENT_PROJECT_VERSION = 380;
|
CURRENT_PROJECT_VERSION = 383;
|
||||||
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
@ -7233,7 +7233,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Session/Meta/Signal.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||||
CURRENT_PROJECT_VERSION = 380;
|
CURRENT_PROJECT_VERSION = 383;
|
||||||
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
DEVELOPMENT_TEAM = SUQ8J2PCT7;
|
||||||
FRAMEWORK_SEARCH_PATHS = (
|
FRAMEWORK_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
|
|
|
@ -249,7 +249,7 @@ private final class EnterPublicKeyVC: UIViewController {
|
||||||
|
|
||||||
private lazy var publicKeyTextView: TextView = {
|
private lazy var publicKeyTextView: TextView = {
|
||||||
let result = TextView(placeholder: "vc_enter_public_key_text_field_hint".localized()) { [weak self] text in
|
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
|
result.autocapitalizationType = .none
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,11 @@ class NotificationSettingsViewModel: SessionTableViewModel<NoNav, NotificationSe
|
||||||
/// just in case the database has changed between the two reads - unfortunately it doesn't look like there is a way to prevent this
|
/// just in case the database has changed between the two reads - unfortunately it doesn't look like there is a way to prevent this
|
||||||
private lazy var _observableSettingsData: ObservableData = ValueObservation
|
private lazy var _observableSettingsData: ObservableData = ValueObservation
|
||||||
.trackingConstantRegion { db -> [SectionModel] in
|
.trackingConstantRegion { db -> [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 [
|
return [
|
||||||
SectionModel(
|
SectionModel(
|
||||||
model: .strategy,
|
model: .strategy,
|
||||||
|
@ -90,11 +95,7 @@ class NotificationSettingsViewModel: SessionTableViewModel<NoNav, NotificationSe
|
||||||
id: .styleSound,
|
id: .styleSound,
|
||||||
title: "NOTIFICATIONS_STYLE_SOUND_TITLE".localized(),
|
title: "NOTIFICATIONS_STYLE_SOUND_TITLE".localized(),
|
||||||
rightAccessory: .dropDown(
|
rightAccessory: .dropDown(
|
||||||
.dynamicString(
|
.dynamicString { notificationSound.displayName }
|
||||||
type: Preferences.Sound.self,
|
|
||||||
key: .defaultNotificationSound,
|
|
||||||
value: { $0.defaulting(to: .defaultNotificationSound).displayName }
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
onTap: { [weak self] in
|
onTap: { [weak self] in
|
||||||
self?.transitionToScreen(
|
self?.transitionToScreen(
|
||||||
|
@ -122,11 +123,7 @@ class NotificationSettingsViewModel: SessionTableViewModel<NoNav, NotificationSe
|
||||||
title: "NOTIFICATIONS_STYLE_CONTENT_TITLE".localized(),
|
title: "NOTIFICATIONS_STYLE_CONTENT_TITLE".localized(),
|
||||||
subtitle: "NOTIFICATIONS_STYLE_CONTENT_DESCRIPTION".localized(),
|
subtitle: "NOTIFICATIONS_STYLE_CONTENT_DESCRIPTION".localized(),
|
||||||
rightAccessory: .dropDown(
|
rightAccessory: .dropDown(
|
||||||
.dynamicString(
|
.dynamicString { previewType.name }
|
||||||
type: Preferences.NotificationPreviewType.self,
|
|
||||||
key: .preferencesNotificationPreviewType,
|
|
||||||
value: { $0.defaulting(to: .defaultPreviewType).name }
|
|
||||||
)
|
|
||||||
),
|
),
|
||||||
onTap: { [weak self] in
|
onTap: { [weak self] in
|
||||||
self?.transitionToScreen(
|
self?.transitionToScreen(
|
||||||
|
|
|
@ -222,32 +222,6 @@ extension SessionCell.Accessory {
|
||||||
case userDefaults(UserDefaults, key: String)
|
case userDefaults(UserDefaults, key: String)
|
||||||
case settingBool(key: Setting.BoolKey)
|
case settingBool(key: Setting.BoolKey)
|
||||||
|
|
||||||
// MARK: - Convenience Types
|
|
||||||
|
|
||||||
public static func dynamicString<ET: EnumIntSetting>(
|
|
||||||
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<ET: EnumStringSetting>(
|
|
||||||
type: ET.Type,
|
|
||||||
key: Setting.EnumKey,
|
|
||||||
value: @escaping ((ET?) -> String?)
|
|
||||||
) -> DataSource {
|
|
||||||
return .dynamicString {
|
|
||||||
let currentValue: ET? = Storage.shared[key]
|
|
||||||
|
|
||||||
return value(currentValue)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MARK: - Convenience
|
// MARK: - Convenience
|
||||||
|
|
||||||
public var currentBoolValue: Bool {
|
public var currentBoolValue: Bool {
|
||||||
|
|
Loading…
Reference in a new issue