Przeglądaj źródła

Revert AwayColoursManager changes.

pull/215/head
Greg Holmes 9 lat temu
rodzic
commit
c0ef4f6ab0

+ 13
- 3
awaycolours/src/com/dmdirc/addons/awaycolours/AwayColoursManager.java Wyświetl plik

@@ -22,13 +22,13 @@
22 22
 
23 23
 package com.dmdirc.addons.awaycolours;
24 24
 
25
+import com.dmdirc.ChannelClientProperty;
25 26
 import com.dmdirc.ClientModule.GlobalConfig;
26 27
 import com.dmdirc.DMDircMBassador;
27 28
 import com.dmdirc.config.ConfigBinder;
28 29
 import com.dmdirc.config.ConfigBinding;
29 30
 import com.dmdirc.events.ChannelUserAwayEvent;
30 31
 import com.dmdirc.events.ChannelUserBackEvent;
31
-import com.dmdirc.events.DisplayProperty;
32 32
 import com.dmdirc.interfaces.config.AggregateConfigProvider;
33 33
 import com.dmdirc.plugins.PluginDomain;
34 34
 import com.dmdirc.ui.messages.ColourManager;
@@ -87,7 +87,12 @@ public class AwayColoursManager {
87 87
 
88 88
     @Handler
89 89
     public void handleAwayEvent(final ChannelUserAwayEvent event) {
90
-        event.getUser().setDisplayProperty(DisplayProperty.FOREGROUND_COLOUR, colour);
90
+        if (nicklist) {
91
+            event.getUser().getMap().put(ChannelClientProperty.NICKLIST_FOREGROUND, colour);
92
+        }
93
+        if (text) {
94
+            event.getUser().getMap().put(ChannelClientProperty.TEXT_FOREGROUND, colour);
95
+        }
91 96
         if (nicklist || text) {
92 97
             event.getChannel().refreshClients();
93 98
         }
@@ -95,7 +100,12 @@ public class AwayColoursManager {
95 100
 
96 101
     @Handler
97 102
     public void handleBackEvent(final ChannelUserBackEvent event) {
98
-        event.getUser().setDisplayProperty(DisplayProperty.FOREGROUND_COLOUR, colour);
103
+        if (nicklist) {
104
+            event.getUser().getMap().remove(ChannelClientProperty.NICKLIST_FOREGROUND);
105
+        }
106
+        if (text) {
107
+            event.getUser().getMap().remove(ChannelClientProperty.TEXT_FOREGROUND);
108
+        }
99 109
         if (nicklist || text) {
100 110
             event.getChannel().refreshClients();
101 111
         }

Ładowanie…
Anuluj
Zapisz