Skip to content

Commit 9307e1e

Browse files
committed
Removed large button from send notification sheet and replaced it with a simple "send" button at the top that matches the "close" button. This should help people with smaller screens and/or accessibility tweaks
1 parent a804c80 commit 9307e1e

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

InfiniLink/View Components/Sheets/ArbitraryNotificationView.swift

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,26 @@ struct ArbitraryNotificationSheet: View {
1818
var placeholderString = "enter text here"
1919

2020
var body: some View {
21-
SheetCloseButton()
21+
ZStack {
22+
SheetCloseButton()
23+
HStack {
24+
Spacer()
25+
Button {
26+
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
27+
if !notificationBody.isEmpty || !notificationTitle.isEmpty {
28+
BLEWriteManager.init().sendNotification(title: notificationTitle, body: notificationBody)
29+
}
30+
SheetManager.shared.showSheet = false
31+
SheetManager.shared.sheetSelection = .connect
32+
} label: {
33+
Text("Send")
34+
.font(.title2)
35+
}
36+
.padding()
37+
38+
}
39+
}
40+
2241
VStack{
2342
Text(NSLocalizedString("send_notification", comment: ""))
2443
.font(.title)
@@ -34,6 +53,7 @@ struct ArbitraryNotificationSheet: View {
3453
.padding(.horizontal)
3554
TextEditor(text: $notificationBody)
3655
.padding(.horizontal)
56+
<<<<<<< HEAD
3757
Button(action: {
3858
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
3959
if !notificationBody.isEmpty || !notificationTitle.isEmpty {
@@ -52,6 +72,8 @@ struct ArbitraryNotificationSheet: View {
5272
.padding(.horizontal, 20)
5373
.padding(.bottom)
5474
}
75+
=======
76+
>>>>>>> 7869ee0 (Removed large button from send notification sheet and replaced it with a simple "send" button at the top that matches the "close" button. This should help people with smaller screens and/or accessibility tweaks)
5577
}
5678
}
5779
}

0 commit comments

Comments
 (0)