ux: Mute selected text
This PR adds the Mute action to the selected text menu. Pressing the mute action will pop up a sheet which allows users to confirm their selection and choose for how long they would like to mute the selected text for. Changelog-Added: Added mute action to selected text menu Signed-off-by: ericholguin <ericholguin@apache.org>
This commit is contained in:
committed by
Daniel D’Aquino
parent
8a75537ea3
commit
d663155941
@@ -15,6 +15,8 @@ struct MutelistView: View {
|
||||
@State var hashtags: [MuteItem] = []
|
||||
@State var threads: [MuteItem] = []
|
||||
@State var words: [MuteItem] = []
|
||||
|
||||
@State var new_text: String = ""
|
||||
|
||||
func RemoveAction(item: MuteItem) -> some View {
|
||||
Button {
|
||||
@@ -120,13 +122,9 @@ struct MutelistView: View {
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $show_add_muteitem, onDismiss: { self.show_add_muteitem = false }) {
|
||||
if #available(iOS 16.0, *) {
|
||||
AddMuteItemView(state: damus_state)
|
||||
.presentationDetents([.height(300)])
|
||||
.presentationDragIndicator(.visible)
|
||||
} else {
|
||||
AddMuteItemView(state: damus_state)
|
||||
}
|
||||
AddMuteItemView(state: damus_state, new_text: $new_text)
|
||||
.presentationDetents([.height(300)])
|
||||
.presentationDragIndicator(.visible)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user