mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-23 21:42:03 +01:00
Fix #1905
This commit is contained in:
parent
f79117eff1
commit
ebdd5b9feb
@ -40,7 +40,13 @@ public enum TimelineFilter: Hashable, Equatable, Identifiable {
|
||||
case resume
|
||||
|
||||
public var id: String {
|
||||
title
|
||||
switch self {
|
||||
case let .remoteLocal(server, filter):
|
||||
return server + filter.rawValue
|
||||
default:
|
||||
return title
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
|
@ -154,13 +154,18 @@ public struct TimelineView: View {
|
||||
break
|
||||
}
|
||||
})
|
||||
.onChange(of: timeline) { _, newValue in
|
||||
.onChange(of: timeline) { oldValue, newValue in
|
||||
switch newValue {
|
||||
case let .remoteLocal(server, _):
|
||||
viewModel.client = Client(server: server)
|
||||
default:
|
||||
switch oldValue {
|
||||
case let .remoteLocal(server, _):
|
||||
viewModel.client = Client(server: server)
|
||||
default:
|
||||
viewModel.client = client
|
||||
}
|
||||
}
|
||||
viewModel.timeline = newValue
|
||||
}
|
||||
.onChange(of: viewModel.timeline) { _, newValue in
|
||||
|
Loading…
Reference in New Issue
Block a user