mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-14 05:21:12 +00:00
Post context menu sound + haptic feedback + correct icons
This commit is contained in:
parent
71495181c6
commit
b6c3b07ad6
1 changed files with 9 additions and 3 deletions
|
@ -30,7 +30,7 @@ struct StatusRowContextMenu: View {
|
|||
}
|
||||
|
||||
if statusDataController.isReblogged {
|
||||
return Label("status.action.unboost", image: "Rocket")
|
||||
return Label("status.action.unboost", image: "Rocket.fill")
|
||||
}
|
||||
return Label("status.action.boost", image: "Rocket")
|
||||
}
|
||||
|
@ -38,21 +38,27 @@ struct StatusRowContextMenu: View {
|
|||
var body: some View {
|
||||
if !viewModel.isRemote {
|
||||
Button { Task {
|
||||
HapticManager.shared.fireHaptic(.notification(.success))
|
||||
SoundEffectManager.shared.playSound(.favorite)
|
||||
await statusDataController.toggleFavorite(remoteStatus: nil)
|
||||
} } label: {
|
||||
Label(statusDataController.isFavorited ? "status.action.unfavorite" : "status.action.favorite", systemImage: "star")
|
||||
Label(statusDataController.isFavorited ? "status.action.unfavorite" : "status.action.favorite", systemImage: statusDataController.isFavorited ? "star.fill" : "star")
|
||||
}
|
||||
Button { Task {
|
||||
HapticManager.shared.fireHaptic(.notification(.success))
|
||||
SoundEffectManager.shared.playSound(.boost)
|
||||
await statusDataController.toggleReblog(remoteStatus: nil)
|
||||
} } label: {
|
||||
boostLabel
|
||||
}
|
||||
.disabled(viewModel.status.visibility == .direct || viewModel.status.visibility == .priv && viewModel.status.account.id != account.account?.id)
|
||||
Button { Task {
|
||||
SoundEffectManager.shared.playSound(.bookmark)
|
||||
HapticManager.shared.fireHaptic(.notification(.success))
|
||||
await statusDataController.toggleBookmark(remoteStatus: nil)
|
||||
} } label: {
|
||||
Label(statusDataController.isBookmarked ? "status.action.unbookmark" : "status.action.bookmark",
|
||||
systemImage: "bookmark")
|
||||
systemImage: statusDataController.isBookmarked ? "bookmark.fill" : "bookmark")
|
||||
}
|
||||
Button {
|
||||
#if targetEnvironment(macCatalyst) || os(visionOS)
|
||||
|
|
Loading…
Reference in a new issue