Edit syncTimeout property, made Config a singleton

This commit is contained in:
DieGurke
2019-11-09 14:23:26 +01:00
parent cd8a92c619
commit e1ef85d702
4 changed files with 25 additions and 6 deletions

View File

@ -25,6 +25,7 @@ import javax.swing.border.EmptyBorder;
import envoy.client.Chat;
import envoy.client.Client;
import envoy.client.Config;
import envoy.client.LocalDB;
import envoy.schema.Message;
import envoy.schema.Sync;
@ -235,7 +236,7 @@ public class ChatWindow extends JFrame {
contentPane.revalidate();
loadUsersAndChats();
startSyncThread(5000);
startSyncThread(Config.getInstance().getSyncTimeout());
contentPane.revalidate();
}
@ -260,7 +261,7 @@ public class ChatWindow extends JFrame {
}
/**
* For detailed information see Javadoc of corresponding methods.
* Updates the data model and the ui every x seconds.
*
* @param timeout the amount of time that passes between two requests sent to
* the server