commit 851bffed0f8ef0ea29fcad82e5bac8f537ee8632
parent 5b820d6920156813630423e9742c55aec4a8819c
Author: William Casarin <jb55@jb55.com>
Date: Fri, 26 Jan 2024 13:52:48 -0800
damus_state: switch to class instead of struct
This was obscuring many state issues
Diffstat:
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/damus/ContentView.swift b/damus/ContentView.swift
@@ -276,7 +276,7 @@ struct ContentView: View {
}
.tabViewStyle(.page(indexDisplayMode: .never))
.overlay(
- SideMenuView(damus_state: damus, isSidebarVisible: $isSideBarOpened.animation())
+ SideMenuView(damus_state: damus_state!, isSidebarVisible: $isSideBarOpened.animation())
)
.navigationDestination(for: Route.self) { route in
route.view(navigationCoordinator: navigationCoordinator, damusState: damus_state!)
diff --git a/damus/Models/DamusState.swift b/damus/Models/DamusState.swift
@@ -8,7 +8,7 @@
import Foundation
import LinkPresentation
-struct DamusState: HeadlessDamusState {
+class DamusState: HeadlessDamusState {
let pool: RelayPool
let keypair: Keypair
let likes: EventCounter