Browse Source

Don't create an event, call the method directly.

pull/224/head
Greg Holmes 9 years ago
parent
commit
95607f8135

+ 1
- 3
contactlist/src/com/dmdirc/addons/contactlist/ContactListCommand.java View File

@@ -31,7 +31,6 @@ import com.dmdirc.commandparser.commands.Command;
31 31
 import com.dmdirc.commandparser.commands.IntelligentCommand;
32 32
 import com.dmdirc.commandparser.commands.context.ChannelCommandContext;
33 33
 import com.dmdirc.commandparser.commands.context.CommandContext;
34
-import com.dmdirc.events.NickListClientsChangedEvent;
35 34
 import com.dmdirc.interfaces.CommandController;
36 35
 import com.dmdirc.ui.input.AdditionalTabTargets;
37 36
 
@@ -65,8 +64,7 @@ public class ContactListCommand extends Command implements IntelligentCommand {
65 64
 
66 65
         final ContactListListener listener = new ContactListListener(chanContext.getChannel());
67 66
         listener.addListeners();
68
-        listener.handleClientsUpdated(new NickListClientsChangedEvent(chanContext.getChannel(),
69
-                chanContext.getChannel().getUsers()));
67
+        chanContext.getChannel().getUsers().forEach(listener::clientAdded);
70 68
     }
71 69
 
72 70
     @Override

+ 1
- 1
contactlist/src/com/dmdirc/addons/contactlist/ContactListListener.java View File

@@ -93,7 +93,7 @@ public class ContactListListener {
93 93
         removeListeners();
94 94
     }
95 95
 
96
-    private void clientAdded(final GroupChatUser client) {
96
+    void clientAdded(final GroupChatUser client) {
97 97
         final Query query = groupChat.getConnection().get()
98 98
                 .getQuery(client.getNickname(), false);
99 99
 

Loading…
Cancel
Save