mirror of
https://github.com/exituser/Pearcleaner.git
synced 2026-09-17 04:58:56 +00:00
v1.6
This commit is contained in:
@@ -15,6 +15,7 @@ struct PearcleanerApp: App {
|
||||
@AppStorage("settings.updater.updateTimeframe") private var updateTimeframe: Int = 1
|
||||
@AppStorage("settings.permissions.disk") private var diskP: Bool = false
|
||||
@AppStorage("settings.permissions.events") private var diskE: Bool = false
|
||||
@AppStorage("settings.permissions.hasLaunched") private var hasLaunched: Bool = false
|
||||
@AppStorage("displayMode") var displayMode: DisplayMode = .system
|
||||
@AppStorage("settings.general.mini") private var mini: Bool = false
|
||||
@State private var search = ""
|
||||
@@ -53,13 +54,16 @@ struct PearcleanerApp: App {
|
||||
// Make sure App Support folder exists in the future if needed for storage
|
||||
ensureApplicationSupportFolderExists(appState: appState)
|
||||
|
||||
// Check for updates
|
||||
if diskP && diskE {
|
||||
// Check for updates 1 minute after app launch
|
||||
if diskP {
|
||||
loadGithubReleases(appState: appState)
|
||||
}
|
||||
|
||||
// Check for disk/accessibility permissions
|
||||
_ = checkAndRequestFullDiskAccess(appState: appState)
|
||||
|
||||
// Check for disk/accessibility permissions just once on initial app launch
|
||||
if !hasLaunched {
|
||||
_ = checkAndRequestFullDiskAccess(appState: appState)
|
||||
hasLaunched = true
|
||||
}
|
||||
|
||||
|
||||
// TIMERS ////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user