Skip to content

Commit cf5103f

Browse files
committed
Updating the mail state indicator when closing the mail app and reloading
Updating the mail state pop-up to make sure all text is shown and not clipped
1 parent 21eacc6 commit cf5103f

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

OpenHaystack/OpenHaystack/HaystackApp/Views/OpenHaystackMainView.swift

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ struct OpenHaystackMainView: View {
192192
if alert == .noReportsFound {
193193
self.popUpAlertType = .noReportsFound
194194
} else {
195+
if alert == .activatePlugin {
196+
self.mailPluginIsActive = false
197+
}
195198
self.alertType = alert
196199
}
197200
case .success(_):
@@ -201,20 +204,21 @@ struct OpenHaystackMainView: View {
201204
}
202205

203206
var mailStatePopover: some View {
204-
HStack {
205-
Image(systemName: "envelope")
206-
.foregroundColor(self.mailPluginIsActive ? .green : .red)
207-
208-
if self.mailPluginIsActive {
209-
Text("The mail plug-in is up and running")
210-
} else {
211-
Text("Cannot connect to the mail plug-in. Open Apple Mail and make sure the plug-in is enabled")
212-
.lineLimit(10)
213-
.multilineTextAlignment(.leading)
207+
VStack {
208+
HStack {
209+
Image(systemName: "envelope")
210+
.font(.title)
211+
.foregroundColor(self.mailPluginIsActive ? .green : .red)
212+
213+
if self.mailPluginIsActive {
214+
Text("The mail plug-in is up and running")
215+
} else {
216+
Text("Cannot connect to the mail plug-in. Open Apple Mail and make sure the plug-in is enabled")
217+
}
214218
}
219+
.padding()
215220
}
216-
.frame(maxWidth: 250)
217-
.padding()
221+
.frame(width: 250, height: 120)
218222
}
219223

220224
func deploy(accessory: Accessory) {

0 commit comments

Comments
 (0)