Fix code to get better performance in validations

feat_androidx_migration
dtvv 2018-09-24 19:41:33 -05:00
parent 2e6c61f88a
commit dae073dc62
1 changed files with 8 additions and 5 deletions

View File

@ -29,11 +29,6 @@ public class LicenseActivity extends AppCompatActivity {
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());
int licenseVersion = getResources().getInteger(R.integer.license_version);
GeneralSetting generalSettingLastLicenseRead = db.generalSettingDao().getSettingByName(GeneralSetting.SETTING_LAST_LICENSE_READ);
@ -43,6 +38,14 @@ public class LicenseActivity extends AppCompatActivity {
startActivity(intent);
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)