Compare commits

...

2 Commits

Author SHA1 Message Date
Shadowfacts 1940368c43 Load account lists in pages of 40 2023-01-28 23:07:38 -05:00
Shadowfacts 49c9c69b5a Fix flicker when opening status action account list in split nav
The container VC background needs to match the content VC
2023-01-28 22:59:30 -05:00
3 changed files with 9 additions and 5 deletions

View File

@ -11,6 +11,8 @@ import Pachyderm
class AccountFollowsListViewController: UIViewController, CollectionViewController {
private static let pageSize = 40
let accountID: String
let mastodonController: MastodonController
let mode: AccountFollowsViewController.Mode
@ -92,9 +94,9 @@ class AccountFollowsListViewController: UIViewController, CollectionViewControll
private func request(for range: RequestRange) -> Request<[Account]> {
switch mode {
case .following:
return Account.getFollowing(accountID, range: range)
return Account.getFollowing(accountID, range: range.withCount(Self.pageSize))
case .followers:
return Account.getFollowers(accountID, range: range)
return Account.getFollowers(accountID, range: range.withCount(Self.pageSize))
}
}

View File

@ -11,6 +11,8 @@ import Pachyderm
class StatusActionAccountListCollectionViewController: UIViewController, CollectionViewController {
private static let pageSize = 40
private let statusID: String
private let actionType: StatusActionAccountListViewController.ActionType
private let mastodonController: MastodonController
@ -147,9 +149,9 @@ class StatusActionAccountListCollectionViewController: UIViewController, Collect
private func request(for range: RequestRange) -> Request<[Account]> {
switch actionType {
case .favorite:
return Status.getFavourites(statusID, range: range)
return Status.getFavourites(statusID, range: range.withCount(Self.pageSize))
case .reblog:
return Status.getReblogs(statusID, range: range)
return Status.getReblogs(statusID, range: range.withCount(Self.pageSize))
}
}

View File

@ -87,7 +87,7 @@ class StatusActionAccountListViewController: UIViewController {
title = NSLocalizedString("Reblogged By", comment: "status reblogged by accounts list title")
}
view.backgroundColor = .secondarySystemBackground
view.backgroundColor = .systemBackground
NotificationCenter.default.addObserver(self, selector: #selector(handleStatusDeleted), name: .statusDeleted, object: nil)
}