Browse Source

outdoor users (18-2)

Louis Farina 11 months ago
parent
commit
8ced4c5798
2 changed files with 5 additions and 5 deletions
  1. 4
    4
      src/chat/NetworkClient.java
  2. 1
    1
      src/chat/ReceiveThread.java

+ 4
- 4
src/chat/NetworkClient.java View File

@@ -123,13 +123,13 @@ public class NetworkClient {
123 123
             		System.out.println(usernameList.length + " users currently connected");
124 124
             		for(String u:usernameList)
125 125
                 	{
126
-            			if(u.length() > 0)
127
-                		known_users.add(new User (u));
126
+            			if(!u.equals(""))
127
+            				known_users.add(new User (u));
128 128
                 	}
129 129
             		for(String u:outdoorUsernameList)
130 130
                 	{
131
-            			if(u.length() > 0)
132
-                		known_outdoor_users.add(new User (u));
131
+            			if(!u.equals(""))
132
+            				known_outdoor_users.add(new User (u));
133 133
                 	}
134 134
             		for(String a:addressList)
135 135
                 	{

+ 1
- 1
src/chat/ReceiveThread.java View File

@@ -135,7 +135,7 @@ class ReceiveThread extends Thread {
135 135
 			            knownUsersPanel.append("\nOutdoor users:\n");
136 136
 			            for(User a:known_outdoor_users)
137 137
 			            {
138
-			            	knownUsersPanel.append("(" + a.getName() + ")  \n");
138
+			            	knownUsersPanel.append(" " + a.getName() + "  \n");
139 139
 			            }
140 140
 			            displayArea.setCaretPosition(displayArea.getDocument().getLength());
141 141
 	            	}

Loading…
Cancel
Save