Compare commits
2 Commits
ff29f2768b
...
1940368c43
Author | SHA1 | Date |
---|---|---|
Shadowfacts | 1940368c43 | |
Shadowfacts | 49c9c69b5a |
|
@ -11,6 +11,8 @@ import Pachyderm
|
||||||
|
|
||||||
class AccountFollowsListViewController: UIViewController, CollectionViewController {
|
class AccountFollowsListViewController: UIViewController, CollectionViewController {
|
||||||
|
|
||||||
|
private static let pageSize = 40
|
||||||
|
|
||||||
let accountID: String
|
let accountID: String
|
||||||
let mastodonController: MastodonController
|
let mastodonController: MastodonController
|
||||||
let mode: AccountFollowsViewController.Mode
|
let mode: AccountFollowsViewController.Mode
|
||||||
|
@ -92,9 +94,9 @@ class AccountFollowsListViewController: UIViewController, CollectionViewControll
|
||||||
private func request(for range: RequestRange) -> Request<[Account]> {
|
private func request(for range: RequestRange) -> Request<[Account]> {
|
||||||
switch mode {
|
switch mode {
|
||||||
case .following:
|
case .following:
|
||||||
return Account.getFollowing(accountID, range: range)
|
return Account.getFollowing(accountID, range: range.withCount(Self.pageSize))
|
||||||
case .followers:
|
case .followers:
|
||||||
return Account.getFollowers(accountID, range: range)
|
return Account.getFollowers(accountID, range: range.withCount(Self.pageSize))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@ import Pachyderm
|
||||||
|
|
||||||
class StatusActionAccountListCollectionViewController: UIViewController, CollectionViewController {
|
class StatusActionAccountListCollectionViewController: UIViewController, CollectionViewController {
|
||||||
|
|
||||||
|
private static let pageSize = 40
|
||||||
|
|
||||||
private let statusID: String
|
private let statusID: String
|
||||||
private let actionType: StatusActionAccountListViewController.ActionType
|
private let actionType: StatusActionAccountListViewController.ActionType
|
||||||
private let mastodonController: MastodonController
|
private let mastodonController: MastodonController
|
||||||
|
@ -147,9 +149,9 @@ class StatusActionAccountListCollectionViewController: UIViewController, Collect
|
||||||
private func request(for range: RequestRange) -> Request<[Account]> {
|
private func request(for range: RequestRange) -> Request<[Account]> {
|
||||||
switch actionType {
|
switch actionType {
|
||||||
case .favorite:
|
case .favorite:
|
||||||
return Status.getFavourites(statusID, range: range)
|
return Status.getFavourites(statusID, range: range.withCount(Self.pageSize))
|
||||||
case .reblog:
|
case .reblog:
|
||||||
return Status.getReblogs(statusID, range: range)
|
return Status.getReblogs(statusID, range: range.withCount(Self.pageSize))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ class StatusActionAccountListViewController: UIViewController {
|
||||||
title = NSLocalizedString("Reblogged By", comment: "status reblogged by accounts list title")
|
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)
|
NotificationCenter.default.addObserver(self, selector: #selector(handleStatusDeleted), name: .statusDeleted, object: nil)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue