Moved client to net package, removed unnecessary recipient property
This commit is contained in:
@ -10,11 +10,11 @@ import javax.swing.*;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
|
||||
import envoy.client.Chat;
|
||||
import envoy.client.Client;
|
||||
import envoy.client.Settings;
|
||||
import envoy.client.database.LocalDb;
|
||||
import envoy.client.event.MessageCreationEvent;
|
||||
import envoy.client.event.ThemeChangeEvent;
|
||||
import envoy.client.net.Client;
|
||||
import envoy.client.ui.list.ComponentList;
|
||||
import envoy.client.ui.settings.SettingsScreen;
|
||||
import envoy.client.util.EnvoyLog;
|
||||
@ -175,8 +175,7 @@ public class ChatWindow extends JFrame {
|
||||
// Read current Chat
|
||||
currentChat.read();
|
||||
|
||||
// Set recipient in client and chat title
|
||||
client.setRecipient(user);
|
||||
// Set chat title
|
||||
textPane.setText(currentChat.getRecipient().getName());
|
||||
|
||||
// Update model and scroll down
|
||||
@ -257,7 +256,7 @@ public class ChatWindow extends JFrame {
|
||||
}
|
||||
|
||||
private void postMessage() {
|
||||
if (!client.hasRecipient()) {
|
||||
if (userList.isSelectionEmpty()) {
|
||||
JOptionPane.showMessageDialog(this, "Please select a recipient!", "Cannot send message", JOptionPane.INFORMATION_MESSAGE);
|
||||
return;
|
||||
}
|
||||
@ -275,7 +274,6 @@ public class ChatWindow extends JFrame {
|
||||
|
||||
// Add message to PersistentLocalDb and update UI
|
||||
currentChat.appendMessage(message);
|
||||
// messageList.setModel(currentChat.getModel());
|
||||
|
||||
// Clear text field
|
||||
messageEnterTextArea.setText("");
|
||||
|
Reference in New Issue
Block a user