feat: Show country selection on first app start

This commit is contained in:
Andrea Busi
2020-10-01 19:16:04 +02:00
parent 76861163a3
commit 00a54dede1
2 changed files with 8 additions and 1 deletions
@@ -45,6 +45,13 @@ class SeismicNetworksViewController: EQNBaseViewController, UITableViewDelegate,
setupUI()
refreshUI()
// only the first time, show the popup for country selection
let alreadyPresented = UserDefaults.standard.bool(forKey: EQNUserDefaultKeyOneShotShowCountry)
if !alreadyPresented {
performSegue(withIdentifier: Self.SegueIdentifierSettings, sender: nil)
UserDefaults.standard.setValue(true, forKey: EQNUserDefaultKeyOneShotShowCountry)
}
}
private func setupUI() {
+1 -1
View File
@@ -40,7 +40,7 @@ static NSString * const EQNServerUrlUploadSettings = @"https://srv.earthquakenet
#pragma mark - UserDefaults Keys
static NSString * const EQNUserDefaultKeySesmicInformations = @"EQNetwork.SeismicInformations";
static NSString * const EQNUserDefaultKeyOneShotShowCountry = @"EQNetwork.OneShot.CountrySelection";
// URL registrazione server
#define URL_SERVER_REGISTRAZIONE @"http://srv.earthquakenetwork.it/distquake_upload_gcm_regid2.php"