Rename timeline related files

This commit is contained in:
Thomas Ricouard 2023-12-31 11:18:42 +01:00
parent acccdb8041
commit 7add850fe6
4 changed files with 7 additions and 7 deletions

View file

@ -4,7 +4,7 @@ import Observation
import SwiftUI
import UIKit
@Observable final class TimelinePrefetcher: NSObject, UICollectionViewDataSourcePrefetching {
@Observable final class TimelineMediaPrefetcher: NSObject, UICollectionViewDataSourcePrefetching {
private let prefetcher = ImagePrefetcher()
weak var viewModel: TimelineViewModel?

View file

@ -6,7 +6,7 @@ import SwiftUI
import DesignSystem
@MainActor
@Observable class PendingStatusesObserver {
@Observable class TimelineUnreadStatusesObserver {
var pendingStatusesCount: Int = 0
var disableUpdate: Bool = false
@ -30,8 +30,8 @@ import DesignSystem
init() {}
}
struct PendingStatusesObserverView: View {
@State var observer: PendingStatusesObserver
struct TimelineUnreadStatusesView: View {
@State var observer: TimelineUnreadStatusesObserver
@Environment(UserPreferences.self) private var preferences
@Environment(Theme.self) private var theme

View file

@ -19,7 +19,7 @@ public struct TimelineView: View {
@Environment(RouterPath.self) private var routerPath
@State private var viewModel = TimelineViewModel()
@State private var prefetcher = TimelinePrefetcher()
@State private var prefetcher = TimelineMediaPrefetcher()
@State private var wasBackgrounded: Bool = false
@State private var collectionView: UICollectionView?
@ -77,7 +77,7 @@ public struct TimelineView: View {
collectionView.prefetchDataSource = prefetcher
}
if viewModel.timeline.supportNewestPagination {
PendingStatusesObserverView(observer: viewModel.pendingStatusesObserver)
TimelineUnreadStatusesView(observer: viewModel.pendingStatusesObserver)
}
}
.safeAreaInset(edge: .top) {

View file

@ -74,7 +74,7 @@ import SwiftUI
}
var isTimelineVisible: Bool = false
let pendingStatusesObserver: PendingStatusesObserver = .init()
let pendingStatusesObserver: TimelineUnreadStatusesObserver = .init()
var scrollToIndexAnimated: Bool = false
var marker: Marker.Content?