Browse Source

add haptic feedback to like action

import UIKit
profile-edit
radixrat 2 years ago
committed by William Casarin
parent
commit
bd58054434
  1. 4
      damus/Views/EventActionBar.swift

4
damus/Views/EventActionBar.swift

@ -6,6 +6,7 @@
//
import SwiftUI
import UIKit
enum ActionBarSheet: Identifiable {
case reply
@ -20,6 +21,7 @@ enum ActionBarSheet: Identifiable {
struct EventActionBar: View {
let damus_state: DamusState
let event: NostrEvent
let generator = UIImpactFeedbackGenerator(style: .light)
@State var sheet: ActionBarSheet? = nil
@State var confirm_boost: Bool = false
@StateObject var bar: ActionBarModel
@ -128,6 +130,8 @@ struct EventActionBar: View {
self.bar.our_like = like_ev
generator.impactOccurred()
damus_state.pool.send(.event(like_ev))
}
}

Loading…
Cancel
Save