mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-17 02:05:13 +00:00
Reset pending statuses when reaching top
This commit is contained in:
parent
bb6910cd83
commit
e278eae144
1 changed files with 7 additions and 2 deletions
|
@ -17,7 +17,13 @@ class TimelineViewModel: ObservableObject {
|
||||||
// Internal source of truth for a timeline.
|
// Internal source of truth for a timeline.
|
||||||
private var statuses: [Status] = []
|
private var statuses: [Status] = []
|
||||||
private var visibileStatusesIds = Set<String>()
|
private var visibileStatusesIds = Set<String>()
|
||||||
var scrollToTopVisible: Bool = false
|
var scrollToTopVisible: Bool = false {
|
||||||
|
didSet {
|
||||||
|
if scrollToTopVisible {
|
||||||
|
pendingStatusesObserver.pendingStatuses = []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private var canStreamEvents: Bool = true
|
private var canStreamEvents: Bool = true
|
||||||
|
|
||||||
|
@ -52,7 +58,6 @@ class TimelineViewModel: ObservableObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Published var tag: Tag?
|
@Published var tag: Tag?
|
||||||
@Published var pendingStatusesCount: Int = 0
|
|
||||||
|
|
||||||
var pendingStatusesEnabled: Bool {
|
var pendingStatusesEnabled: Bool {
|
||||||
timeline == .home
|
timeline == .home
|
||||||
|
|
Loading…
Reference in a new issue