Working on handshake mechanism with login
This commit is contained in:
@ -10,13 +10,13 @@ import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
|
||||
import envoy.client.*;
|
||||
import envoy.client.event.EventBus;
|
||||
import envoy.client.event.ThemeChangeEvent;
|
||||
import envoy.client.ui.settings.SettingsScreen;
|
||||
import envoy.client.util.EnvoyLog;
|
||||
import envoy.data.Message;
|
||||
import envoy.data.TextMessage;
|
||||
import envoy.data.User;
|
||||
import envoy.event.EventBus;
|
||||
|
||||
/**
|
||||
* Project: <strong>envoy-client</strong><br>
|
||||
@ -297,14 +297,15 @@ public class ChatWindow extends JFrame {
|
||||
|
||||
// Synchronize
|
||||
try {
|
||||
localDB.applySync(client.sendSync(client.getSender().getId(), localDB.fillSync(client.getSender().getId())));
|
||||
// localDB.applySync(client.sendSync(client.getSender().getId(),
|
||||
// localDB.fillSync(client.getSender().getId())));
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "Could not perform sync", e);
|
||||
}
|
||||
|
||||
// Process unread messages
|
||||
localDB.addUnreadMessagesToLocalDB();
|
||||
localDB.clearUnreadMessagesSync();
|
||||
// TODO: Process unread messages
|
||||
// localDB.addUnreadMessagesToLocalDB();
|
||||
// localDB.clearUnreadMessagesSync();
|
||||
|
||||
// Mark unread messages as read when they are in the current chat
|
||||
readCurrentChat();
|
||||
@ -325,7 +326,11 @@ public class ChatWindow extends JFrame {
|
||||
/**
|
||||
* Marks messages in the current chat as {@code READ}.
|
||||
*/
|
||||
private void readCurrentChat() { if (currentChat != null) { localDB.setMessagesToRead(currentChat); } }
|
||||
private void readCurrentChat() {
|
||||
if (currentChat != null) {
|
||||
// TODO: localDB.setMessagesToRead(currentChat);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the {@link Client} used by this {@link ChatWindow}. If the client is
|
||||
|
Reference in New Issue
Block a user