Implemented message ID generation and generator requests
* Persisting IdGenerator in LocalDB * Added Client#requestIdGenerator() * Listening to MessageCreationEvents in ChatWindow
This commit is contained in:
@ -62,7 +62,7 @@ public class Startup {
|
||||
if (!config.isInitialized()) throw new EnvoyException("Server or port are not defined");
|
||||
} catch (Exception e) {
|
||||
JOptionPane
|
||||
.showMessageDialog(null, "Error loading configuration values: \n" + e.toString(), "Configuration error", JOptionPane.ERROR_MESSAGE);
|
||||
.showMessageDialog(null, "Error loading configuration values:\n" + e.toString(), "Configuration error", JOptionPane.ERROR_MESSAGE);
|
||||
System.exit(1);
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -97,7 +97,8 @@ public class Startup {
|
||||
Client client = new Client();
|
||||
try {
|
||||
// Try entering online mode first
|
||||
client.onlineInit(credentials);
|
||||
localDB.loadIdGenerator();
|
||||
client.onlineInit(credentials, localDB);
|
||||
} catch (Exception e1) {
|
||||
logger.warning("Could not connect to server. Trying offline mode...");
|
||||
e1.printStackTrace();
|
||||
|
Reference in New Issue
Block a user