* Improved connection performance on new release, no more empty cards on startup;

This commit is contained in:
Oleg Agafonov 2019-03-01 18:55:20 +04:00
parent 6846db75f4
commit f788af1f6a
4 changed files with 20 additions and 10 deletions

View file

@ -19,6 +19,7 @@ import java.util.List;
public final class RepositoryUtil {
private static final Logger logger = Logger.getLogger(RepositoryUtil.class);
public static final boolean CARD_DB_RECREATE_BY_CLIENT_SIDE = true; // re-creates db from client (best performance) or downloads from server on connects (can be slow)
public static void bootstrapLocalDb() {
// call local db to init all sets and cards repository (need for correct updates cycle, not on random request)
@ -103,4 +104,9 @@ public final class RepositoryUtil {
}
}
public static boolean isDatabaseEmpty() {
return ExpansionRepository.instance.getSetByCode("GRN") == null
|| CardRepository.instance.findCard("Island") == null;
}
}