mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-01 09:57:21 +01:00
Remove unused code
This commit is contained in:
parent
cfa0e9a2bc
commit
9bf072e827
@ -37,8 +37,6 @@ extension NotificationView {
|
||||
|
||||
extension NotificationView {
|
||||
public func configure(notification: MastodonNotification) {
|
||||
viewModel.objects.insert(notification)
|
||||
|
||||
configureAuthor(notification: notification)
|
||||
|
||||
switch notification.entity.type {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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?
|
||||
|
@ -178,8 +178,6 @@ public final class NotificationView: UIView {
|
||||
|
||||
public func prepareForReuse() {
|
||||
disposeBag.removeAll()
|
||||
|
||||
viewModel.objects.removeAll()
|
||||
|
||||
viewModel.authContext = nil
|
||||
viewModel.authorAvatarImageURL = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user