Compare commits
No commits in common. "6e27399e107d494dd14de4e97c54e4adf5a52bdd" and "1f40cc9928a59ca4fe9cd18bdf52427b4a5e34a4" have entirely different histories.
6e27399e10
...
1f40cc9928
|
@ -209,16 +209,9 @@ class ProfileTableViewController: EnhancedTableViewController {
|
||||||
guard case let .success(newStatuses, pagination) = response else { fatalError() }
|
guard case let .success(newStatuses, pagination) = response else { fatalError() }
|
||||||
|
|
||||||
self.mastodonController.persistentContainer.addAll(statuses: newStatuses) {
|
self.mastodonController.persistentContainer.addAll(statuses: newStatuses) {
|
||||||
self.older = pagination?.older
|
self.timelineSegments[indexPath.section - 2].append(contentsOf: newStatuses.map { ($0.id, .unknown) })
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
self.older = pagination?.older
|
||||||
let start = self.timelineSegments[indexPath.section - 2].count
|
|
||||||
let indexPaths = (0..<newStatuses.count).map { IndexPath(row: start + $0, section: indexPath.section) }
|
|
||||||
self.timelineSegments[indexPath.section - 2].append(contentsOf: newStatuses.map { ($0.id, .unknown) })
|
|
||||||
UIView.performWithoutAnimation {
|
|
||||||
self.tableView.insertRows(at: indexPaths, with: .none)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,17 +236,13 @@ class ProfileTableViewController: EnhancedTableViewController {
|
||||||
guard case let .success(newStatuses, pagination) = response else { fatalError() }
|
guard case let .success(newStatuses, pagination) = response else { fatalError() }
|
||||||
|
|
||||||
self.mastodonController.persistentContainer.addAll(statuses: newStatuses) {
|
self.mastodonController.persistentContainer.addAll(statuses: newStatuses) {
|
||||||
|
self.timelineSegments[0].insert(contentsOf: newStatuses.map { ($0.id, .unknown) }, at: 0)
|
||||||
|
|
||||||
if let newer = pagination?.newer {
|
if let newer = pagination?.newer {
|
||||||
self.newer = newer
|
self.newer = newer
|
||||||
}
|
}
|
||||||
|
|
||||||
let indexPaths = (0..<newStatuses.count).map { IndexPath(row: $0, section: 2) }
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
self.timelineSegments[0].insert(contentsOf: newStatuses.map { ($0.id, .unknown) }, at: 0)
|
|
||||||
UIView.performWithoutAnimation {
|
|
||||||
self.tableView.insertRows(at: indexPaths, with: .none)
|
|
||||||
}
|
|
||||||
|
|
||||||
self.refreshControl?.endRefreshing()
|
self.refreshControl?.endRefreshing()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -273,12 +262,7 @@ class ProfileTableViewController: EnhancedTableViewController {
|
||||||
}
|
}
|
||||||
pinnedStatuses.append((status.id, state))
|
pinnedStatuses.append((status.id, state))
|
||||||
}
|
}
|
||||||
DispatchQueue.main.async {
|
self.pinnedStatuses = pinnedStatuses
|
||||||
self.pinnedStatuses = pinnedStatuses
|
|
||||||
UIView.performWithoutAnimation {
|
|
||||||
self.tableView.reloadSections(IndexSet(integer: 1), with: .none)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,9 +84,11 @@ class TimelineStatusTableViewCell: BaseStatusTableViewCell {
|
||||||
|
|
||||||
updateTimestamp()
|
updateTimestamp()
|
||||||
|
|
||||||
let pinned = showPinned && (status.pinned ?? false)
|
if showPinned {
|
||||||
timestampLabel.isHidden = pinned
|
let pinned = status.pinned ?? false
|
||||||
pinImageView.isHidden = !pinned
|
timestampLabel.isHidden = pinned
|
||||||
|
pinImageView.isHidden = !pinned
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc override func preferencesChanged() {
|
@objc override func preferencesChanged() {
|
||||||
|
|
Loading…
Reference in New Issue