Fix favorite action (IOS-176)
This commit is contained in:
parent
36d4f6ea15
commit
9809e69751
|
@ -99,7 +99,6 @@ extension DataSourceFacade {
|
|||
action: ActionToolbarContainer.Action,
|
||||
sender: UIButton
|
||||
) async throws {
|
||||
let managedObjectContext = provider.context.managedObjectContext
|
||||
let _status = status.reblog ?? status
|
||||
|
||||
switch action {
|
||||
|
@ -111,7 +110,7 @@ extension DataSourceFacade {
|
|||
context: provider.context,
|
||||
authContext: provider.authContext,
|
||||
composeContext: .composeStatus,
|
||||
destination: .reply(parent: status)
|
||||
destination: .reply(parent: _status)
|
||||
)
|
||||
_ = provider.coordinator.present(
|
||||
scene: .compose(viewModel: composeViewModel),
|
||||
|
@ -121,17 +120,17 @@ extension DataSourceFacade {
|
|||
case .reblog:
|
||||
try await DataSourceFacade.responseToStatusReblogAction(
|
||||
provider: provider,
|
||||
status: status
|
||||
status: _status
|
||||
)
|
||||
case .like:
|
||||
try await DataSourceFacade.responseToStatusFavoriteAction(
|
||||
provider: provider,
|
||||
status: status
|
||||
status: _status
|
||||
)
|
||||
case .share:
|
||||
try await DataSourceFacade.responseToStatusShareAction(
|
||||
provider: provider,
|
||||
status: status,
|
||||
status: _status,
|
||||
button: sender
|
||||
)
|
||||
} // end switch
|
||||
|
|
|
@ -37,11 +37,11 @@ extension APIService {
|
|||
}
|
||||
|
||||
let _status = status.reblog ?? status
|
||||
let isFavorited = status.entity.favourited == true
|
||||
let favoritedCount = Int64(status.entity.favouritesCount)
|
||||
let isFavorited = _status.entity.favourited == true
|
||||
let favoritedCount = Int64(_status.entity.favouritesCount)
|
||||
|
||||
let context = MastodonFavoriteContext(
|
||||
statusID: status.id,
|
||||
statusID: _status.id,
|
||||
isFavorited: isFavorited,
|
||||
favoritedCount: favoritedCount
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue