Fix code to get better performance in validations
This commit is contained in:
parent
2e6c61f88a
commit
dae073dc62
1 changed files with 8 additions and 5 deletions
|
@ -29,11 +29,6 @@ public class LicenseActivity extends AppCompatActivity {
|
||||||
|
|
||||||
ButterKnife.bind(this);
|
ButterKnife.bind(this);
|
||||||
|
|
||||||
// TODO check if license has been agreed
|
|
||||||
|
|
||||||
String html = getString(R.string.licence_html);
|
|
||||||
wvEULA.loadData(html, "text/html", "UTF-8");
|
|
||||||
|
|
||||||
db = CrystalDatabase.getAppDatabase(this.getApplicationContext());
|
db = CrystalDatabase.getAppDatabase(this.getApplicationContext());
|
||||||
int licenseVersion = getResources().getInteger(R.integer.license_version);
|
int licenseVersion = getResources().getInteger(R.integer.license_version);
|
||||||
GeneralSetting generalSettingLastLicenseRead = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_LAST_LICENSE_READ);
|
GeneralSetting generalSettingLastLicenseRead = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_LAST_LICENSE_READ);
|
||||||
|
@ -43,6 +38,14 @@ public class LicenseActivity extends AppCompatActivity {
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
else{
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Load the licence only if it is necesarry
|
||||||
|
* */
|
||||||
|
String html = getString(R.string.licence_html);
|
||||||
|
wvEULA.loadData(html, "text/html", "UTF-8");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnClick(R.id.btnAgree)
|
@OnClick(R.id.btnAgree)
|
||||||
|
|
Loading…
Reference in a new issue