Don't show last update time if there is no value
This commit is contained in:
parent
29e43fec3c
commit
7a59f59e6a
|
@ -125,8 +125,8 @@ public class DebugActivity extends AppCompatActivity {
|
||||||
sb.append("Base version: ").append(communityDatabase.getBaseDbVersion());
|
sb.append("Base version: ").append(communityDatabase.getBaseDbVersion());
|
||||||
sb.append(" (SIA: ").append(communityDatabase.getSiaAppVersion()).append(")\n");
|
sb.append(" (SIA: ").append(communityDatabase.getSiaAppVersion()).append(")\n");
|
||||||
sb.append("Effective version: ").append(communityDatabase.getEffectiveDbVersion()).append('\n');
|
sb.append("Effective version: ").append(communityDatabase.getEffectiveDbVersion()).append('\n');
|
||||||
sb.append("Last update time: ").append(new Date(App.getSettings().getLastUpdateTime())).append('\n');
|
sb.append("Last update time: ").append(dateOrNever(App.getSettings().getLastUpdateTime())).append('\n');
|
||||||
sb.append("Last update check time: ").append(new Date(App.getSettings().getLastUpdateCheckTime())).append('\n');
|
sb.append("Last update check time: ").append(dateOrNever(App.getSettings().getLastUpdateCheckTime())).append('\n');
|
||||||
|
|
||||||
FeaturedDatabase featuredDatabase = DatabaseSingleton.getFeaturedDatabase();
|
FeaturedDatabase featuredDatabase = DatabaseSingleton.getFeaturedDatabase();
|
||||||
|
|
||||||
|
@ -137,6 +137,11 @@ public class DebugActivity extends AppCompatActivity {
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String dateOrNever(long time) {
|
||||||
|
if (time > 0) return new Date(time).toString();
|
||||||
|
return "never";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(String info) {
|
protected void onPostExecute(String info) {
|
||||||
setResult(info);
|
setResult(info);
|
||||||
|
|
Loading…
Reference in New Issue