feat haptic feedback for reply action

This commit is contained in:
CMK 2021-07-20 20:04:56 +08:00
parent 7aaafcdc10
commit 4ee065eda4
1 changed files with 4 additions and 1 deletions

View File

@ -525,7 +525,10 @@ extension StatusProviderFacade {
.sink { [weak provider] status in
guard let provider = provider else { return }
guard let status = status?.reblog ?? status else { return }
let generator = UIImpactFeedbackGenerator(style: .light)
generator.impactOccurred()
let composeViewModel = ComposeViewModel(context: provider.context, composeKind: .reply(repliedToStatusObjectID: status.objectID))
provider.coordinator.present(scene: .compose(viewModel: composeViewModel), from: provider, transition: .modal(animated: true, completion: nil))
}