Preserve isSensitiveToggled state when interacting with posts (IOS-176)
This commit is contained in:
parent
112dce06f5
commit
38423a14ca
|
@ -24,6 +24,9 @@ extension DataSourceFacade {
|
||||||
authenticationBox: provider.authContext.mastodonAuthenticationBox
|
authenticationBox: provider.authContext.mastodonAuthenticationBox
|
||||||
).value
|
).value
|
||||||
|
|
||||||
provider.update(status: .fromEntity(updatedStatus))
|
let newStatus: MastodonStatus = .fromEntity(updatedStatus)
|
||||||
|
newStatus.isSensitiveToggled = status.isSensitiveToggled
|
||||||
|
|
||||||
|
provider.update(status: newStatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,14 @@ extension DataSourceFacade {
|
||||||
let selectionFeedbackGenerator = await UISelectionFeedbackGenerator()
|
let selectionFeedbackGenerator = await UISelectionFeedbackGenerator()
|
||||||
await selectionFeedbackGenerator.selectionChanged()
|
await selectionFeedbackGenerator.selectionChanged()
|
||||||
|
|
||||||
let newStatus = try await provider.context.apiService.favorite(
|
let updatedStatus = try await provider.context.apiService.favorite(
|
||||||
status: status,
|
status: status,
|
||||||
authenticationBox: provider.authContext.mastodonAuthenticationBox
|
authenticationBox: provider.authContext.mastodonAuthenticationBox
|
||||||
).value
|
).value
|
||||||
|
|
||||||
provider.update(status: .fromEntity(newStatus))
|
let newStatus: MastodonStatus = .fromEntity(updatedStatus)
|
||||||
|
newStatus.isSensitiveToggled = status.isSensitiveToggled
|
||||||
|
|
||||||
|
provider.update(status: newStatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,14 @@ extension DataSourceFacade {
|
||||||
let selectionFeedbackGenerator = await UISelectionFeedbackGenerator()
|
let selectionFeedbackGenerator = await UISelectionFeedbackGenerator()
|
||||||
await selectionFeedbackGenerator.selectionChanged()
|
await selectionFeedbackGenerator.selectionChanged()
|
||||||
|
|
||||||
let newStatus = try await provider.context.apiService.reblog(
|
let updatedStatus = try await provider.context.apiService.reblog(
|
||||||
status: status,
|
status: status,
|
||||||
authenticationBox: provider.authContext.mastodonAuthenticationBox
|
authenticationBox: provider.authContext.mastodonAuthenticationBox
|
||||||
).value
|
).value
|
||||||
|
|
||||||
provider.update(status: .fromEntity(newStatus))
|
let newStatus: MastodonStatus = .fromEntity(updatedStatus)
|
||||||
|
newStatus.isSensitiveToggled = status.isSensitiveToggled
|
||||||
|
|
||||||
|
provider.update(status: newStatus)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue