Remove unused code

This commit is contained in:
Nathan Mattes 2024-01-11 14:07:57 +01:00
parent cfa0e9a2bc
commit 9bf072e827
4 changed files with 0 additions and 32 deletions

View File

@ -37,8 +37,6 @@ extension NotificationView {
extension NotificationView {
public func configure(notification: MastodonNotification) {
viewModel.objects.insert(notification)
configureAuthor(notification: notification)
switch notification.entity.type {

View File

@ -51,33 +51,6 @@ extension Mastodon.Entity {
public let source: Source?
public let suspended: Bool?
public let muteExpiresAt: Date?
internal init(id: Mastodon.Entity.Account.ID, username: String, acct: String, url: String, displayName: String, note: String, avatar: String, avatarStatic: String? = nil, header: String, headerStatic: String? = nil, locked: Bool, emojis: [Mastodon.Entity.Emoji] = [], discoverable: Bool? = nil, createdAt: Date, lastStatusAt: Date? = nil, statusesCount: Int, followersCount: Int, followingCount: Int, moved: Mastodon.Entity.Account? = nil, fields: [Mastodon.Entity.Field]? = nil, bot: Bool? = nil, source: Mastodon.Entity.Source? = nil, suspended: Bool? = nil, muteExpiresAt: Date? = nil) {
self.id = id
self.username = username
self.acct = acct
self.url = url
self.displayName = displayName
self.note = note
self.avatar = avatar
self.avatarStatic = avatarStatic
self.header = header
self.headerStatic = headerStatic
self.locked = locked
self.emojis = emojis
self.discoverable = discoverable
self.createdAt = createdAt
self.lastStatusAt = lastStatusAt
self.statusesCount = statusesCount
self.followersCount = followersCount
self.followingCount = followingCount
self.moved = moved
self.fields = fields
self.bot = bot
self.source = source
self.suspended = suspended
self.muteExpiresAt = muteExpiresAt
}
}
}

View File

@ -19,7 +19,6 @@ import CoreDataStack
extension NotificationView {
public final class ViewModel: ObservableObject {
public var disposeBag = Set<AnyCancellable>()
public var objects = Set<AnyHashable>()
@Published public var context: AppContext?
@Published public var authContext: AuthContext?

View File

@ -178,8 +178,6 @@ public final class NotificationView: UIView {
public func prepareForReuse() {
disposeBag.removeAll()
viewModel.objects.removeAll()
viewModel.authContext = nil
viewModel.authorAvatarImageURL = nil