Skip to content

Commit

Permalink
sorry sorry sorry
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantin Clerc committed Feb 7, 2024
1 parent 92626e3 commit 247f707
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions Geranium/Cleaner/CleanerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,6 @@ struct CleanerView: View {
if safari || appCaches || otaCaches || leftoverCaches || custompathselect {
Button("Clean !", action: {
UIApplication.shared.confirmAlert(title: "Selected options", body: "Safari Caches: \(truelyEnabled(safari))\nGeneral Caches: \(truelyEnabled(appCaches))\nOTA Update Caches: \(truelyEnabled(otaCaches))\nApps Leftover Caches: \(truelyEnabled(leftoverCaches))\(customTest(isEnabled: custompathselect))\n Are you sure you want to permanently delete those files ? \(draftWarning(isEnabled: leftoverCaches))", onOK: {

if ProcessInfo().operatingSystemVersion.majorVersion == 15, appSettings.firstCleanerTime {
appSettings.firstCleanerTime = false
UIApplication.shared.yesoubiennon(title: "⚠️ You are on iOS 15 ⚠️", body: "Cleaning on iOS 15 might break notifications, and some app permissions. Do you want to enable measures that will keep your phone safe ? You might not get everything completly cleaned up. Pressing yes on iOS 15 will keep your device safe.", onOK: {
appSettings.tmpClean = false
}, noCancel: false, onCancel: {
appSettings.tmpClean = true
}, yes: true)
}
print("")
withAnimation {
var sizetotal = (safariCacheSize + GlobalCacheSize + OTACacheSize + leftOverCacheSize) / (1024 * 1024)
Expand Down Expand Up @@ -113,6 +104,14 @@ struct CleanerView: View {
.padding(2)

.onAppear {
if ProcessInfo().operatingSystemVersion.majorVersion == 15, appSettings.firstCleanerTime {
appSettings.firstCleanerTime = false
UIApplication.shared.yesoubiennon(title: "⚠️ You are on iOS 15 ⚠️", body: "Cleaning on iOS 15 might break notifications, and some app permissions. Do you want to enable measures that will keep your phone safe ? You might not get everything completly cleaned up. Pressing yes on iOS 15 will keep your device safe.", onOK: {
appSettings.tmpClean = false
}, noCancel: false, onCancel: {
appSettings.tmpClean = true
}, yes: true)
}
getSizeForSafariCaches { size in
self.safariCacheSize = size
}
Expand Down

0 comments on commit 247f707

Please sign in to comment.