@@ -11,7 +11,31 @@ import SwiftUI
|
||||
struct damusApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
MainView()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
struct MainView: View {
|
||||
@State var needs_setup = true;
|
||||
|
||||
var body: some View {
|
||||
if needs_setup {
|
||||
SetupView()
|
||||
.onReceive(handle_notify(.login)) { notif in
|
||||
needs_setup = false
|
||||
}
|
||||
} else {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func needs_setup() -> Bool {
|
||||
let _ = get_saved_privkey()
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user