Pārlūkot izejas kodu

Include the manager in the event.

pull/311/head
Chris Smith 9 gadus atpakaļ
vecāks
revīzija
4098815c1b

+ 8
- 1
src/com/dmdirc/events/UnreadStatusChangedEvent.java Parādīt failu

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.events;
24 24
 
25 25
 import com.dmdirc.FrameContainer;
26
+import com.dmdirc.ui.messages.UnreadStatusManager;
26 27
 import com.dmdirc.util.colours.Colour;
27 28
 
28 29
 import java.util.Optional;
@@ -33,12 +34,14 @@ import java.util.Optional;
33 34
 public class UnreadStatusChangedEvent extends DMDircEvent {
34 35
 
35 36
     private final FrameContainer source;
37
+    private final UnreadStatusManager manager;
36 38
     private final Optional<Colour> notificationColour;
37 39
     private final int unreadCount;
38 40
 
39
-    public UnreadStatusChangedEvent(final FrameContainer source,
41
+    public UnreadStatusChangedEvent(final FrameContainer source, final UnreadStatusManager manager,
40 42
             final Optional<Colour> notificationColour, final int unreadCount) {
41 43
         this.source = source;
44
+        this.manager = manager;
42 45
         this.notificationColour = notificationColour;
43 46
         this.unreadCount = unreadCount;
44 47
     }
@@ -47,6 +50,10 @@ public class UnreadStatusChangedEvent extends DMDircEvent {
47 50
         return source;
48 51
     }
49 52
 
53
+    public UnreadStatusManager getManager() {
54
+        return manager;
55
+    }
56
+
50 57
     public Optional<Colour> getNotificationColour() {
51 58
         return notificationColour;
52 59
     }

+ 1
- 1
src/com/dmdirc/ui/messages/UnreadStatusManager.java Parādīt failu

@@ -114,7 +114,7 @@ public class UnreadStatusManager {
114 114
             notificationColour = Optional.of(colour);
115 115
         }
116 116
 
117
-        eventBus.publishAsync(new UnreadStatusChangedEvent(container, notificationColour,
117
+        eventBus.publishAsync(new UnreadStatusChangedEvent(container, this, notificationColour,
118 118
                 unreadLines));
119 119
     }
120 120
 

Notiek ielāde…
Atcelt
Saglabāt