Compare commits
No commits in common. "c740fb1c1f43bb7c24aa77f72bd346d6fb6fd26b" and "d481ef6c9f0e265969a44701ed77a5b3b3012076" have entirely different histories.
c740fb1c1f
...
d481ef6c9f
|
@ -11,7 +11,7 @@ import Pachyderm
|
||||||
|
|
||||||
class AccountFollowsListViewController: UIViewController, CollectionViewController {
|
class AccountFollowsListViewController: UIViewController, CollectionViewController {
|
||||||
|
|
||||||
private static nonisolated let pageSize = 40
|
private static let pageSize = 40
|
||||||
|
|
||||||
let accountID: String
|
let accountID: String
|
||||||
let mastodonController: MastodonController
|
let mastodonController: MastodonController
|
||||||
|
|
|
@ -102,12 +102,6 @@ class TrendsViewController: UIViewController, CollectionViewController {
|
||||||
config.topSeparatorVisibility = .hidden
|
config.topSeparatorVisibility = .hidden
|
||||||
config.bottomSeparatorVisibility = .hidden
|
config.bottomSeparatorVisibility = .hidden
|
||||||
}
|
}
|
||||||
if config.topSeparatorInsets != .zero {
|
|
||||||
config.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
}
|
|
||||||
if config.bottomSeparatorInsets != .zero {
|
|
||||||
config.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
}
|
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
return .list(using: listConfig, layoutEnvironment: environment)
|
return .list(using: listConfig, layoutEnvironment: environment)
|
||||||
|
|
|
@ -78,7 +78,6 @@ class ProfileStatusesViewController: UIViewController, TimelineLikeCollectionVie
|
||||||
} else if indexPath.row == 0 && (section == .pinned || section == .entries) {
|
} else if indexPath.row == 0 && (section == .pinned || section == .entries) {
|
||||||
// TODO: row == 0 isn't technically right, the top post could be filtered out
|
// TODO: row == 0 isn't technically right, the top post could be filtered out
|
||||||
config.topSeparatorInsets = .zero
|
config.topSeparatorInsets = .zero
|
||||||
config.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
} else if case .status(id: _, collapseState: _, filterState: let filterState, pinned: _) = item,
|
} else if case .status(id: _, collapseState: _, filterState: let filterState, pinned: _) = item,
|
||||||
filterer.isKnownHide(state: filterState) {
|
filterer.isKnownHide(state: filterState) {
|
||||||
config.topSeparatorVisibility = .hidden
|
config.topSeparatorVisibility = .hidden
|
||||||
|
|
|
@ -93,7 +93,7 @@ class SearchResultsViewController: UIViewController, CollectionViewController {
|
||||||
config.trailingSwipeActionsConfigurationProvider = { [unowned self] in
|
config.trailingSwipeActionsConfigurationProvider = { [unowned self] in
|
||||||
(self.collectionView.cellForItem(at: $0) as? TimelineStatusCollectionViewCell)?.trailingSwipeActions()
|
(self.collectionView.cellForItem(at: $0) as? TimelineStatusCollectionViewCell)?.trailingSwipeActions()
|
||||||
}
|
}
|
||||||
if sectionIdentifier == .statuses || sectionIdentifier == .accounts {
|
if sectionIdentifier == .statuses {
|
||||||
config.separatorConfiguration.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
config.separatorConfiguration.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
||||||
config.separatorConfiguration.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
config.separatorConfiguration.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,12 +57,6 @@ class StatusActionAccountListCollectionViewController: UIViewController, Collect
|
||||||
config.topSeparatorVisibility = .hidden
|
config.topSeparatorVisibility = .hidden
|
||||||
config.bottomSeparatorVisibility = .hidden
|
config.bottomSeparatorVisibility = .hidden
|
||||||
}
|
}
|
||||||
if config.topSeparatorInsets != .zero {
|
|
||||||
config.topSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
}
|
|
||||||
if config.bottomSeparatorInsets != .zero {
|
|
||||||
config.bottomSeparatorInsets = TimelineStatusCollectionViewCell.separatorInsets
|
|
||||||
}
|
|
||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
let layout = UICollectionViewCompositionalLayout { [unowned self] sectionIndex, environment in
|
let layout = UICollectionViewCompositionalLayout { [unowned self] sectionIndex, environment in
|
||||||
|
|
|
@ -33,7 +33,6 @@ struct AccountDisplayNameView: View {
|
||||||
.onAppear(perform: self.loadEmojis)
|
.onAppear(perform: self.loadEmojis)
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
|
||||||
private func loadEmojis() {
|
private func loadEmojis() {
|
||||||
let fullRange = NSRange(account.displayName.startIndex..., in: account.displayName)
|
let fullRange = NSRange(account.displayName.startIndex..., in: account.displayName)
|
||||||
let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange)
|
let matches = emojiRegex.matches(in: account.displayName, options: [], range: fullRange)
|
||||||
|
|
|
@ -33,7 +33,6 @@ struct CustomEmojiImageView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@MainActor
|
|
||||||
private func loadImage() {
|
private func loadImage() {
|
||||||
request = ImageCache.emojis.get(URL(emoji.url)!) { (_, image) in
|
request = ImageCache.emojis.get(URL(emoji.url)!) { (_, image) in
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|
|
@ -15,7 +15,7 @@ private let hashtagIcon = UIImage(systemName: "number")
|
||||||
|
|
||||||
class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollectionViewCell {
|
class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollectionViewCell {
|
||||||
|
|
||||||
static let separatorInsets = NSDirectionalEdgeInsets(top: 0, leading: 16 + 50 + 8, bottom: 0, trailing: 0)
|
static let separatorInsets = NSDirectionalEdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 0)
|
||||||
static let contentFont = UIFontMetrics.default.scaledFont(for: .systemFont(ofSize: 16))
|
static let contentFont = UIFontMetrics.default.scaledFont(for: .systemFont(ofSize: 16))
|
||||||
static let monospaceFont = UIFontMetrics.default.scaledFont(for: .monospacedSystemFont(ofSize: 16, weight: .regular))
|
static let monospaceFont = UIFontMetrics.default.scaledFont(for: .monospacedSystemFont(ofSize: 16, weight: .regular))
|
||||||
static let contentParagraphStyle = HTMLConverter.defaultParagraphStyle
|
static let contentParagraphStyle = HTMLConverter.defaultParagraphStyle
|
||||||
|
|
Loading…
Reference in New Issue