nostrscript: add a helper function

This commit is contained in:
William Casarin
2023-07-03 16:59:50 -07:00
parent a6cbf50def
commit 30e33a01c1
9 changed files with 98 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ let fallback_zap_amount = 1000
private var value: T
init(key: String, default_value: T) {
if T is bool {
if T.self == Bool.self {
UserSettingsStore.bool_options.insert(key)
}
self.key = pk_setting_key(UserSettingsStore.pubkey ?? "", key: key)