Display pinned state whe modifying

This commit is contained in:
Justin Mazzocchi 2021-02-03 13:51:45 -08:00
parent 533a1d1830
commit 4142e66862
No known key found for this signature in database
GPG key ID: E223E6937AAFB01C
3 changed files with 5 additions and 1 deletions

View file

@ -355,6 +355,8 @@ private extension TableViewController {
switch event {
case .ignorableOutput:
break
case .refresh:
refreshIfAble()
case let .share(url):
share(url: url)
case let .navigation(navigation):

View file

@ -6,6 +6,7 @@ import ServiceLayer
public enum CollectionItemEvent {
case ignorableOutput
case refresh
case navigation(Navigation)
case attachment(AttachmentViewModel, StatusViewModel)
case compose(inReplyTo: StatusViewModel?, redraft: Status?)

View file

@ -255,7 +255,8 @@ public extension StatusViewModel {
func togglePinned() {
eventsSubject.send(
statusService.togglePinned()
.map { _ in .ignorableOutput }
.collect()
.map { _ in .refresh }
.eraseToAnyPublisher())
}