public void setCurrentRaidId(String currentRaidId) { boolean changed = setValue(CURRENT_RAID_ID, currentRaidId); if (changed) { if (TerminalDB.getConnectedInstance() != null) { DistancesRegistry.getInstance().refresh(); TeamsRegistry.getInstance().refresh(); UsersRegistry.getInstance().refresh(); } } }
public void setPathToTerminalDB(String pathToTerminalDB) { boolean changed = setValue(PATH_TO_TERMINAL_DB, pathToTerminalDB); if (changed) { TerminalDB.getRawInstance().closeConnection(); // reconnect in getInstance TerminalDB.getRawInstance().tryConnectToDB(); if (TerminalDB.getRawInstance().isConnected()) { DistancesRegistry.getInstance().refresh(); TeamsRegistry.getInstance().refresh(); UsersRegistry.getInstance().refresh(); } } }
public void setPathToDB(String pathToDB) { boolean changed = setValue(PATH_TO_DB, pathToDB); if (changed) { SQLiteDatabaseAdapter.getRawInstance().closeConnection(); // reconnect in getInstance SQLiteDatabaseAdapter.getRawInstance().tryConnectToDB(); if (SQLiteDatabaseAdapter.getRawInstance().isConnected()) { DistancesRegistry.getInstance().refresh(); TeamsRegistry.getInstance().refresh(); UsersRegistry.getInstance().refresh(); } } }
public void setCurrentRaidId(String currentRaidId) { boolean changed = setValue(CURRENT_RAID_ID, currentRaidId); if (changed) { if (SQLiteDatabaseAdapter.getConnectedInstance() != null) { DistancesRegistry.getInstance().refresh(); ScanPointsRegistry.getInstance().refresh(); TeamsRegistry.getInstance().refresh(); UsersRegistry.getInstance().refresh(); Log.d( "SETTINGS", "current raid ID: " + ConfigurationAdapter.getInstance().getCurrentRaidId()); } } }