Share latestCurrentAccountKey preference key for share extension
This commit is contained in:
parent
9098fdf515
commit
b0ac1b4f57
|
@ -3,8 +3,10 @@ import Network
|
||||||
import Env
|
import Env
|
||||||
import Models
|
import Models
|
||||||
|
|
||||||
|
@MainActor
|
||||||
public class AppAccountsManager: ObservableObject {
|
public class AppAccountsManager: ObservableObject {
|
||||||
@AppStorage("latestCurrentAccountKey") static public var latestCurrentAccountKey: String = ""
|
@AppStorage("latestCurrentAccountKey", store: UserPreferences.sharedDefault)
|
||||||
|
static public var latestCurrentAccountKey: String = ""
|
||||||
|
|
||||||
@Published public var currentAccount: AppAccount {
|
@Published public var currentAccount: AppAccount {
|
||||||
didSet {
|
didSet {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Network
|
||||||
|
|
||||||
@MainActor
|
@MainActor
|
||||||
public class UserPreferences: ObservableObject {
|
public class UserPreferences: ObservableObject {
|
||||||
private static let sharedDefault = UserDefaults.init(suiteName: "group.icecubesapps")
|
public static let sharedDefault = UserDefaults.init(suiteName: "group.icecubesapps")
|
||||||
|
|
||||||
private var client: Client?
|
private var client: Client?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue