mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 09:41:00 +00:00
Display pinned state whe modifying
This commit is contained in:
parent
533a1d1830
commit
4142e66862
3 changed files with 5 additions and 1 deletions
|
@ -355,6 +355,8 @@ private extension TableViewController {
|
||||||
switch event {
|
switch event {
|
||||||
case .ignorableOutput:
|
case .ignorableOutput:
|
||||||
break
|
break
|
||||||
|
case .refresh:
|
||||||
|
refreshIfAble()
|
||||||
case let .share(url):
|
case let .share(url):
|
||||||
share(url: url)
|
share(url: url)
|
||||||
case let .navigation(navigation):
|
case let .navigation(navigation):
|
||||||
|
|
|
@ -6,6 +6,7 @@ import ServiceLayer
|
||||||
|
|
||||||
public enum CollectionItemEvent {
|
public enum CollectionItemEvent {
|
||||||
case ignorableOutput
|
case ignorableOutput
|
||||||
|
case refresh
|
||||||
case navigation(Navigation)
|
case navigation(Navigation)
|
||||||
case attachment(AttachmentViewModel, StatusViewModel)
|
case attachment(AttachmentViewModel, StatusViewModel)
|
||||||
case compose(inReplyTo: StatusViewModel?, redraft: Status?)
|
case compose(inReplyTo: StatusViewModel?, redraft: Status?)
|
||||||
|
|
|
@ -255,7 +255,8 @@ public extension StatusViewModel {
|
||||||
func togglePinned() {
|
func togglePinned() {
|
||||||
eventsSubject.send(
|
eventsSubject.send(
|
||||||
statusService.togglePinned()
|
statusService.togglePinned()
|
||||||
.map { _ in .ignorableOutput }
|
.collect()
|
||||||
|
.map { _ in .refresh }
|
||||||
.eraseToAnyPublisher())
|
.eraseToAnyPublisher())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue