添加即时收款流程并对齐 Android
This commit is contained in:
@ -33,6 +33,7 @@ final class AppStore {
|
||||
static let onlineStatus = "key_online_status"
|
||||
static let lastLocationReportTime = "key_last_location_report_time"
|
||||
static let locationReminderMinutes = "key_location_reminder_minutes"
|
||||
static let isOpenReceiveVoice = "key_is_open_receive_voice"
|
||||
}
|
||||
|
||||
private let defaults: UserDefaults
|
||||
@ -154,6 +155,12 @@ final class AppStore {
|
||||
set { defaults.set(newValue, forKey: accountScopedKey(Key.locationReminderMinutes)) }
|
||||
}
|
||||
|
||||
/// 收款到账是否开启语音播报,对齐 Android `getIsOpenReceiveVoice`。
|
||||
var isOpenReceiveVoice: Bool {
|
||||
get { defaults.bool(forKey: accountScopedKey(Key.isOpenReceiveVoice)) }
|
||||
set { defaults.set(newValue, forKey: accountScopedKey(Key.isOpenReceiveVoice)) }
|
||||
}
|
||||
|
||||
/// 当前账号缓存前缀,对齐 Android `getAccountCachePrefix`。
|
||||
var accountCachePrefix: String {
|
||||
let uid = userId.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
@ -309,6 +316,7 @@ final class AppStore {
|
||||
Key.onlineStatus,
|
||||
Key.lastLocationReportTime,
|
||||
Key.locationReminderMinutes,
|
||||
Key.isOpenReceiveVoice,
|
||||
]
|
||||
keys.forEach { defaults.removeObject(forKey: prefix + $0) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user