Browse Source

Add blank topics appropriately when rejoining

Fixes issue 3810

Change-Id: Ibf44992d80eee00c3a7f190949f4a55a3be93777
Reviewed-on: http://gerrit.dmdirc.com/919
Reviewed-by: Gregory Holmes <greg@dmdirc.com>
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
tags/0.6.3rc1
Chris Smith 14 years ago
parent
commit
5dd54461a9
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      src/com/dmdirc/ChannelEventHandler.java

+ 7
- 1
src/com/dmdirc/ChannelEventHandler.java View File

@@ -132,7 +132,13 @@ public final class ChannelEventHandler extends EventHandler implements
132 132
                     cChannel.getChannelClient(cChannel.getTopicSetter(), true), cChannel.getTopic());
133 133
         }
134 134
 
135
-        if (!bIsJoinTopic || !newTopic.getTopic().isEmpty()) {
135
+        if (!bIsJoinTopic 
136
+                || (owner.getCurrentTopic() == null && !newTopic.getTopic().isEmpty())
137
+                || (owner.getCurrentTopic() != null
138
+                && !newTopic.getTopic().equals(owner.getCurrentTopic().getTopic()))) {
139
+            // Only add the topic if it's being changed when we're on the
140
+            // channel (i.e., not a "joinTopic"), or if it's different to the
141
+            // one we're expecting
136 142
             owner.addTopic(newTopic);
137 143
         }
138 144
     }

Loading…
Cancel
Save