Remove unused code
This commit is contained in:
parent
cfa0e9a2bc
commit
9bf072e827
|
@ -37,8 +37,6 @@ extension NotificationView {
|
||||||
|
|
||||||
extension NotificationView {
|
extension NotificationView {
|
||||||
public func configure(notification: MastodonNotification) {
|
public func configure(notification: MastodonNotification) {
|
||||||
viewModel.objects.insert(notification)
|
|
||||||
|
|
||||||
configureAuthor(notification: notification)
|
configureAuthor(notification: notification)
|
||||||
|
|
||||||
switch notification.entity.type {
|
switch notification.entity.type {
|
||||||
|
|
|
@ -51,33 +51,6 @@ extension Mastodon.Entity {
|
||||||
public let source: Source?
|
public let source: Source?
|
||||||
public let suspended: Bool?
|
public let suspended: Bool?
|
||||||
public let muteExpiresAt: Date?
|
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@ import CoreDataStack
|
||||||
extension NotificationView {
|
extension NotificationView {
|
||||||
public final class ViewModel: ObservableObject {
|
public final class ViewModel: ObservableObject {
|
||||||
public var disposeBag = Set<AnyCancellable>()
|
public var disposeBag = Set<AnyCancellable>()
|
||||||
public var objects = Set<AnyHashable>()
|
|
||||||
|
|
||||||
@Published public var context: AppContext?
|
@Published public var context: AppContext?
|
||||||
@Published public var authContext: AuthContext?
|
@Published public var authContext: AuthContext?
|
||||||
|
|
|
@ -179,8 +179,6 @@ public final class NotificationView: UIView {
|
||||||
public func prepareForReuse() {
|
public func prepareForReuse() {
|
||||||
disposeBag.removeAll()
|
disposeBag.removeAll()
|
||||||
|
|
||||||
viewModel.objects.removeAll()
|
|
||||||
|
|
||||||
viewModel.authContext = nil
|
viewModel.authContext = nil
|
||||||
viewModel.authorAvatarImageURL = nil
|
viewModel.authorAvatarImageURL = nil
|
||||||
avatarButton.avatarImageView.cancelTask()
|
avatarButton.avatarImageView.cancelTask()
|
||||||
|
|
Loading…
Reference in New Issue