Skip to content

Commit

Permalink
Rename FirstRunFlag to make the logic easier to read and set first ru…
Browse files Browse the repository at this point in the history
…n done in welcome screen itself
  • Loading branch information
nirvn committed Jan 31, 2024
1 parent 83af549 commit e3942ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/qml/WelcomeScreen.qml
Original file line number Diff line number Diff line change
Expand Up @@ -871,18 +871,18 @@ Page {
function adjustWelcomeScreen() {
if (visible) {
const currentProjectButtonVisible = !!qgisProject.fileName;
currentProjectButton.visible = currentProjectButtonVisible

if (firstShown) {
welcomeText.text = " ";
currentProjectButton.visible = currentProjectButtonVisible
} else {
var firstRun = !settings.value( "/QField/FirstRunFlag", false )
var firstRun = !settings.valueBool( "/QField/FirstRunDone", false )
if ( firstRun ) {
welcomeText.text = qsTr( "Welcome to QField. First time using this application? Try the sample projects listed below." )
settings.setValue( "/QField/FirstRunDone", true )
} else {
welcomeText.text = qsTr( "Welcome back to QField." )
}
currentProjectButton.visible = currentProjectButtonVisible
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -3351,8 +3351,6 @@ ApplicationWindow {
}

layoutListInstantiator.model.reloadModel()

settings.setValue( "/QField/FirstRunFlag", false )
}

function onSetMapExtent(extent) {
Expand Down

0 comments on commit e3942ec

Please sign in to comment.