Optimize viewMethod change

This commit is contained in:
pjx206 2021-04-06 00:20:56 +08:00
parent 4f0489703a
commit f7700ed5d7
2 changed files with 2 additions and 4 deletions

1
.gitignore vendored
View file

@ -52,3 +52,4 @@ compile_commands.json
*creator.user*
/build/*
.vscode

View file

@ -72,10 +72,7 @@ Meui.Window {
source: settings.viewMethod === 0 ? listSource : gridSource
onClicked: {
if (settings.viewMethod === 1)
settings.viewMethod = 0
else
settings.viewMethod = 1
settings.viewMethod ^= 1 // reverse settings.viewMethod
}
}
}