Skip to content

Commit

Permalink
Add first run check
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Jan 5, 2024
1 parent 854c7f5 commit adcea64
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions qfieldsync/core/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ def __init__(self):
self.add_setting(
String("cloudDirectory", Scope.Global, str(home.joinpath("QField/cloud")))
)
self.add_setting(Bool("firstRun", Scope.Global, True))
6 changes: 5 additions & 1 deletion qfieldsync/qfield_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ def __init__(self, iface):
self.cloud_item_gui_provider
)

# autologin
# first run check
if self.preferences.value("firstRun"):
self.preferences.set_value("firstRun", False)

# auto login check
if self.preferences.value("qfieldCloudRememberMe"):
self.network_manager.auto_login_attempt()

Expand Down

0 comments on commit adcea64

Please sign in to comment.