mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 10:11:00 +00:00
Share latestCurrentAccountKey preference key for share extension
This commit is contained in:
parent
9098fdf515
commit
b0ac1b4f57
2 changed files with 4 additions and 2 deletions
|
@ -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 a new issue