Compare commits
No commits in common. "c3cf38b0c90aec227ffc6ea65a11781a31326aff" and "4b43726e1d062b4d820e684d9bab65a18406b72c" have entirely different histories.
c3cf38b0c9
...
4b43726e1d
|
@ -134,16 +134,6 @@ public class InstanceFeatures: ObservableObject {
|
|||
}
|
||||
}
|
||||
|
||||
public var statusEditNotifications: Bool {
|
||||
// pleroma doesn't seem to support 'update' type notifications, even though it supports edits
|
||||
hasMastodonVersion(3, 5, 0)
|
||||
}
|
||||
|
||||
public var statusNotifications: Bool {
|
||||
// pleroma doesn't support notifications for new posts from an account
|
||||
hasMastodonVersion(3, 3, 0)
|
||||
}
|
||||
|
||||
public var needsEditAttachmentsInSeparateRequest: Bool {
|
||||
instanceType.isPleroma(.akkoma(nil))
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ class ActionNotificationGroupCollectionViewCell: UICollectionViewListCell {
|
|||
avatarStack.arrangedSubviews.forEach { $0.removeFromSuperview() }
|
||||
for avatarURL in people.lazy.compactMap(\.avatar).prefix(10) {
|
||||
let imageView = CachedImageView(cache: .avatars)
|
||||
imageView.contentMode = .scaleAspectFill
|
||||
imageView.contentMode = .scaleAspectFit
|
||||
imageView.layer.masksToBounds = true
|
||||
imageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 30
|
||||
imageView.layer.cornerCurve = .continuous
|
||||
|
|
|
@ -121,7 +121,6 @@ class FollowNotificationGroupCollectionViewCell: UICollectionViewListCell {
|
|||
avatarStack.arrangedSubviews.forEach { $0.removeFromSuperview() }
|
||||
for avatarURL in people.lazy.compactMap(\.avatar).prefix(10) {
|
||||
let imageView = CachedImageView(cache: .avatars)
|
||||
imageView.contentMode = .scaleAspectFill
|
||||
imageView.layer.masksToBounds = true
|
||||
imageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 30
|
||||
imageView.layer.cornerCurve = .continuous
|
||||
|
|
|
@ -20,7 +20,6 @@ class FollowRequestNotificationCollectionViewCell: UICollectionViewListCell {
|
|||
}
|
||||
|
||||
private let avatarImageView = CachedImageView(cache: .avatars).configure {
|
||||
$0.contentMode = .scaleAspectFill
|
||||
$0.layer.masksToBounds = true
|
||||
$0.layer.cornerCurve = .continuous
|
||||
NSLayoutConstraint.activate([
|
||||
|
|
|
@ -398,19 +398,13 @@ extension NotificationsCollectionViewController {
|
|||
var types = Set(Notification.Kind.allCases)
|
||||
types.remove(.unknown)
|
||||
allowedTypes.forEach { types.remove($0) }
|
||||
if !mastodonController.instanceFeatures.statusEditNotifications {
|
||||
types.remove(.update)
|
||||
}
|
||||
if !mastodonController.instanceFeatures.statusNotifications {
|
||||
types.remove(.status)
|
||||
}
|
||||
return Client.getNotifications(excludedTypes: Array(types), range: range)
|
||||
}
|
||||
}
|
||||
|
||||
private func validateNotifications(_ notifications: [Pachyderm.Notification]) -> [Pachyderm.Notification] {
|
||||
return notifications.compactMap { notif in
|
||||
if notif.status == nil && (notif.kind == .mention || notif.kind == .reblog || notif.kind == .favourite || notif.kind == .status) {
|
||||
if notif.status == nil && (notif.kind == .mention || notif.kind == .reblog || notif.kind == .favourite) {
|
||||
let crumb = Breadcrumb(level: .fatal, category: "notifications")
|
||||
crumb.data = [
|
||||
"id": notif.id,
|
||||
|
|
|
@ -486,7 +486,6 @@ class CustomAlertPresentationAnimation: NSObject, UIViewControllerAnimatedTransi
|
|||
|
||||
let container = transitionContext.containerView
|
||||
container.addSubview(alert.view)
|
||||
alert.view.frame = container.bounds
|
||||
|
||||
guard transitionContext.isAnimated else {
|
||||
presenter.view.tintAdjustmentMode = .dimmed
|
||||
|
|
|
@ -28,7 +28,6 @@ class ConversationMainStatusCollectionViewCell: UICollectionViewListCell, Status
|
|||
|
||||
private static let avatarImageViewSize: CGFloat = 50
|
||||
private(set) lazy var avatarImageView = CachedImageView(cache: .avatars).configure {
|
||||
$0.contentMode = .scaleAspectFill
|
||||
$0.layer.masksToBounds = true
|
||||
$0.layer.cornerCurve = .continuous
|
||||
NSLayoutConstraint.activate([
|
||||
|
|
|
@ -75,7 +75,6 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti
|
|||
|
||||
private static let avatarImageViewSize: CGFloat = 50
|
||||
private(set) lazy var avatarImageView = CachedImageView(cache: .avatars).configure {
|
||||
$0.contentMode = .scaleAspectFill
|
||||
$0.layer.masksToBounds = true
|
||||
$0.layer.cornerCurve = .continuous
|
||||
NSLayoutConstraint.activate([
|
||||
|
@ -536,21 +535,6 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti
|
|||
fatalError()
|
||||
}
|
||||
|
||||
self.statusState = state
|
||||
|
||||
let reblogStatus: StatusMO?
|
||||
if let rebloggedStatus = status.reblog {
|
||||
reblogStatus = status
|
||||
reblogStatusID = statusID
|
||||
rebloggerID = status.account.id
|
||||
|
||||
status = rebloggedStatus
|
||||
} else {
|
||||
reblogStatus = nil
|
||||
reblogStatusID = nil
|
||||
rebloggerID = nil
|
||||
}
|
||||
|
||||
switch filterResult {
|
||||
case .allow:
|
||||
setContentViewMode(.status)
|
||||
|
@ -561,10 +545,6 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti
|
|||
attrStr.append(showStr)
|
||||
filteredLabel.attributedText = attrStr
|
||||
setContentViewMode(.filtered)
|
||||
|
||||
// still update id properties, so that info for other methods (e.g., context menus) is correct
|
||||
self.statusID = status.id
|
||||
self.accountID = status.account.id
|
||||
return
|
||||
case .hide:
|
||||
fatalError("unreachable")
|
||||
|
@ -572,11 +552,20 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti
|
|||
|
||||
createObservers()
|
||||
|
||||
self.statusState = state
|
||||
|
||||
var hideTimelineReason = true
|
||||
|
||||
if let reblogStatus {
|
||||
if let rebloggedStatus = status.reblog {
|
||||
reblogStatusID = statusID
|
||||
rebloggerID = status.account.id
|
||||
|
||||
hideTimelineReason = false
|
||||
updateRebloggerLabel(reblogger: reblogStatus.account)
|
||||
updateRebloggerLabel(reblogger: status.account)
|
||||
status = rebloggedStatus
|
||||
} else {
|
||||
reblogStatusID = nil
|
||||
rebloggerID = nil
|
||||
}
|
||||
|
||||
if showFollowedHashtags {
|
||||
|
|
Loading…
Reference in New Issue