chore: remove navigationBar newPostsView when loadmore
This commit is contained in:
parent
b60fe36b25
commit
1abe550745
|
@ -9,7 +9,6 @@ import Combine
|
|||
import Foundation
|
||||
import UIKit
|
||||
|
||||
|
||||
final class HomeTimelineNavigationBarState {
|
||||
static let errorCountMax: Int = 3
|
||||
var disposeBag = Set<AnyCancellable>()
|
||||
|
@ -149,7 +148,7 @@ extension HomeTimelineNavigationBarState {
|
|||
if newContent {
|
||||
self.showNewPostsInNavigationBar()
|
||||
}
|
||||
if (newContent) {
|
||||
if newContent {
|
||||
self.newTopContent.value = false
|
||||
}
|
||||
}
|
||||
|
@ -173,7 +172,10 @@ extension HomeTimelineNavigationBarState {
|
|||
networkErrorCountSubject.send(false)
|
||||
case .finished:
|
||||
reCountdown()
|
||||
showPublishingNewPostInNavigationBar()
|
||||
let isShowingOfflineView = viewController?.navigationItem.titleView === HomeTimelineNavigationBarView.offlineView
|
||||
if isShowingOfflineView {
|
||||
showMastodonLogoInNavigationBar()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
import UIKit
|
||||
|
||||
final class HomeTimelineNavigationBarView {
|
||||
|
||||
static let mastodonLogoTitleView: UIImageView = {
|
||||
let imageView = UIImageView(image: Asset.Asset.mastodonTextLogo.image.withRenderingMode(.alwaysTemplate))
|
||||
imageView.tintColor = Asset.Colors.Label.primary.color
|
||||
|
@ -80,4 +79,3 @@ final class HomeTimelineNavigationBarView {
|
|||
return label
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,10 +71,8 @@ extension HomeTimelineViewModel.LoadOldestState {
|
|||
// enter no more state when no new toots
|
||||
if toots.isEmpty || (toots.count == 1 && toots[0].id == maxID) {
|
||||
stateMachine.enter(NoMore.self)
|
||||
viewModel.homeTimelineNavigationBarState.newBottomContent.value = false
|
||||
} else {
|
||||
stateMachine.enter(Idle.self)
|
||||
viewModel.homeTimelineNavigationBarState.newBottomContent.value = true
|
||||
}
|
||||
}
|
||||
.store(in: &viewModel.disposeBag)
|
||||
|
|
Loading…
Reference in New Issue