Fix list on older instances

This commit is contained in:
Thomas Ricouard 2023-12-01 08:14:57 +01:00
parent 32be7d4460
commit 885a134eaf
2 changed files with 6 additions and 6 deletions

View File

@ -28,8 +28,8 @@ import Env
init(list: Models.List) {
self.list = list
self.title = list.title
self.repliesPolicy = list.repliesPolicy
self.isExclusive = list.exclusive
self.repliesPolicy = list.repliesPolicy ?? .list
self.isExclusive = list.exclusive ?? false
}
func fetchAccounts() async {
@ -54,8 +54,8 @@ import Env
exclusive: isExclusive ))
self.list = list
self.title = list.title
self.repliesPolicy = list.repliesPolicy
self.isExclusive = list.exclusive
self.repliesPolicy = list.repliesPolicy ?? .list
self.isExclusive = list.exclusive ?? false
self.isUpdating = false
await CurrentAccount.shared.fetchLists()
} catch {

View File

@ -3,8 +3,8 @@ import Foundation
public struct List: Codable, Identifiable, Equatable, Hashable {
public let id: String
public let title: String
public let repliesPolicy: RepliesPolicy
public let exclusive: Bool
public let repliesPolicy: RepliesPolicy?
public let exclusive: Bool?
public enum RepliesPolicy: String, Sendable, Codable, CaseIterable, Identifiable {
public var id: String {