Skip to content

Commit a899ed6

Browse files
committed
Should fix crash when iPadOS is enabled
1 parent aa5c6b7 commit a899ed6

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

Sources/ContentView.swift

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -196,29 +196,30 @@ Thanks to:
196196
}
197197

198198
func testBypassAppLimit() {
199-
if ready() {
200-
Task {
201-
taskRunning = true
199+
Task {
200+
taskRunning = true
201+
if ready() {
202202
mbdb = Restore.createBypassAppLimit()
203-
taskRunning = false
204203
path.append("BypassAppLimit")
204+
} else {
205+
lastError = "minimuxer is not ready. Ensure you have WiFi and WireGuard VPN set up."
206+
showErrorAlert.toggle()
205207
}
206-
} else {
207-
lastError = "minimuxer is not ready. Ensure you have WiFi and WireGuard VPN set up."
208-
showErrorAlert.toggle()
208+
taskRunning = false
209209
}
210210
}
211211

212212
func applyChanges() {
213-
if ready() {
214-
Task {
213+
Task {
214+
taskRunning = true
215+
if ready() {
215216
mbdb = Restore.createBackupFiles(files: generateFilesToRestore())
216-
taskRunning = false
217217
path.append("ApplyChanges")
218+
} else {
219+
lastError = "minimuxer is not ready. Ensure you have WiFi and WireGuard VPN set up."
220+
showErrorAlert.toggle()
218221
}
219-
} else {
220-
lastError = "minimuxer is not ready. Ensure you have WiFi and WireGuard VPN set up."
221-
showErrorAlert.toggle()
222+
taskRunning = false
222223
}
223224
}
224225

0 commit comments

Comments
 (0)