mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-22 22:08:07 +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 {
|
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")
|
return Label("status.action.boost", image: "Rocket")
|
||||||
}
|
}
|
||||||
|
@ -38,21 +38,27 @@ struct StatusRowContextMenu: View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
if !viewModel.isRemote {
|
if !viewModel.isRemote {
|
||||||
Button { Task {
|
Button { Task {
|
||||||
|
HapticManager.shared.fireHaptic(.notification(.success))
|
||||||
|
SoundEffectManager.shared.playSound(.favorite)
|
||||||
await statusDataController.toggleFavorite(remoteStatus: nil)
|
await statusDataController.toggleFavorite(remoteStatus: nil)
|
||||||
} } label: {
|
} } 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 {
|
Button { Task {
|
||||||
|
HapticManager.shared.fireHaptic(.notification(.success))
|
||||||
|
SoundEffectManager.shared.playSound(.boost)
|
||||||
await statusDataController.toggleReblog(remoteStatus: nil)
|
await statusDataController.toggleReblog(remoteStatus: nil)
|
||||||
} } label: {
|
} } label: {
|
||||||
boostLabel
|
boostLabel
|
||||||
}
|
}
|
||||||
.disabled(viewModel.status.visibility == .direct || viewModel.status.visibility == .priv && viewModel.status.account.id != account.account?.id)
|
.disabled(viewModel.status.visibility == .direct || viewModel.status.visibility == .priv && viewModel.status.account.id != account.account?.id)
|
||||||
Button { Task {
|
Button { Task {
|
||||||
|
SoundEffectManager.shared.playSound(.bookmark)
|
||||||
|
HapticManager.shared.fireHaptic(.notification(.success))
|
||||||
await statusDataController.toggleBookmark(remoteStatus: nil)
|
await statusDataController.toggleBookmark(remoteStatus: nil)
|
||||||
} } label: {
|
} } label: {
|
||||||
Label(statusDataController.isBookmarked ? "status.action.unbookmark" : "status.action.bookmark",
|
Label(statusDataController.isBookmarked ? "status.action.unbookmark" : "status.action.bookmark",
|
||||||
systemImage: "bookmark")
|
systemImage: statusDataController.isBookmarked ? "bookmark.fill" : "bookmark")
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
#if targetEnvironment(macCatalyst) || os(visionOS)
|
#if targetEnvironment(macCatalyst) || os(visionOS)
|
||||||
|
|
Loading…
Reference in a new issue