forked from zelo72/mastodon-ios
fix: Toot.emojis wrong keyPath issue
This commit is contained in:
parent
9c54095f40
commit
b749d0a7bc
|
@ -93,7 +93,7 @@ public extension Toot {
|
|||
}
|
||||
|
||||
if let emojis = property.emojis {
|
||||
toot.mutableSetValue(forKey: #keyPath(Toot.mentions)).addObjects(from: emojis)
|
||||
toot.mutableSetValue(forKey: #keyPath(Toot.emojis)).addObjects(from: emojis)
|
||||
}
|
||||
|
||||
if let tags = property.tags {
|
||||
|
@ -123,10 +123,11 @@ public extension Toot {
|
|||
if let bookmarkedBy = property.bookmarkedBy {
|
||||
toot.mutableSetValue(forKey: #keyPath(Toot.bookmarkedBy)).add(bookmarkedBy)
|
||||
}
|
||||
if let pinnedBy = property.pinnedBy {
|
||||
toot.mutableSetValue(forKey: #keyPath(Toot.pinnedBy))
|
||||
}
|
||||
|
||||
// TODO: not implement yet
|
||||
// if let pinnedBy = property.pinnedBy {
|
||||
// toot.mutableSetValue(forKey: #keyPath(Toot.pinnedBy))
|
||||
// }
|
||||
|
||||
toot.updatedAt = property.updatedAt
|
||||
toot.deletedAt = property.deletedAt
|
||||
|
|
|
@ -72,6 +72,18 @@ extension APIService.Persist {
|
|||
homeTimelineIndexes: nil)
|
||||
Toot.insert(into: managedObjectContext, property: tootProperty, author: author)
|
||||
}
|
||||
}.eraseToAnyPublisher()
|
||||
}
|
||||
.handleEvents(receiveOutput: { result in
|
||||
switch result {
|
||||
case .success:
|
||||
break
|
||||
case .failure(let error):
|
||||
#if DEBUG
|
||||
debugPrint(error)
|
||||
#endif
|
||||
assertionFailure(error.localizedDescription)
|
||||
}
|
||||
})
|
||||
.eraseToAnyPublisher()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue