diff --git a/app/src/main/java/com/cringe_studios/code_guard/MainActivity.java b/app/src/main/java/com/cringe_studios/code_guard/MainActivity.java index 56811d2..9074e03 100644 --- a/app/src/main/java/com/cringe_studios/code_guard/MainActivity.java +++ b/app/src/main/java/com/cringe_studios/code_guard/MainActivity.java @@ -225,11 +225,6 @@ public class MainActivity extends BaseActivity { } }); - if(SettingsUtil.isFirstLaunch(this) && SettingsUtil.getGroups(this).isEmpty()) { - SettingsUtil.addGroup(this, UUID.randomUUID().toString(), "My Codes"); - SettingsUtil.setFirstLaunch(this, false); - } - OTPDatabase.promptLoadDatabase(this, this::launchApp, this::finishAffinity); } @@ -258,6 +253,12 @@ public class MainActivity extends BaseActivity { }else { NavigationUtil.navigate(this, HomeFragment.class, null); } + + if(SettingsUtil.isFirstLaunch(this) && SettingsUtil.getGroups(this).isEmpty()) { + SettingsUtil.addGroup(this, UUID.randomUUID().toString(), "My Codes"); + DialogUtil.showYesNo(this, R.string.enable_encryption_title, R.string.enable_encryption_message, () -> NavigationUtil.navigate(this, SettingsFragment.class, null), null); + SettingsUtil.setFirstLaunch(this, false); + } } @Override diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2ee3b75..acfe02c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -127,6 +127,8 @@ Broken icon packs Some icon packs failed to load.\n\nDo you want to delete the broken icon packs? Icon pack with %d icon(s) imported + It is recommended enable encryption to improve the security of the application.\n\nDo you want to go to the settings now to enable encryption? + Enable encryption Override Rename existing