global: make sure we unsubscribe after each refresh
This commit is contained in:
1 parent
b1d14ff21f
commit
37460f933b
2 files changed
+12
-3
No files matched your search
@@ -85,7 +85,11 @@ struct SearchHomeView: View {
|
||||
print("search change 1")
|
||||
}
|
||||
.onAppear {
|
||||
model.subscribe()
|
||||
// TODO: This will always be empty when switching between tabs
|
||||
// We'll need to store these in
|
||||
if model.events.isEmpty {
|
||||
model.subscribe()
|
||||
}
|
||||
}
|
||||
.onDisappear {
|
||||
model.unsubscribe()
|
||||
|
||||
Reference in new issue
Block a user