mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 12:31:59 -08:00
* Improved connection performance on new release, no more empty cards on startup;
This commit is contained in:
parent
6846db75f4
commit
f788af1f6a
4 changed files with 20 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue