Check if file exists instead of explicitly checking for symlink

This commit is contained in:
Rokosun 2023-11-07 08:00:48 +01:00
parent e5dda337ad
commit 5ebe7e33eb
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ method view(app: AppState): Widget =
Label {.hAlign: AlignEnd.}:
text = "Open this Welcome Screen on every boot"
Switch {.vAlign: AlignCenter, hAlign: AlignStart.}:
state = if symlinkExists(autostartSymlinkPath): true else: false
state = if fileExists(autostartSymlinkPath): true else: false
proc changed(state: bool) =
if state == true:
if not symlinkExists(autostartSymlinkPath):