Parcourir la source

Merge pull request #659 from csmith/master

Remove some unused code.
pull/660/head
Greg Holmes il y a 8 ans
Parent
révision
68143a3727
2 fichiers modifiés avec 0 ajouts et 46 suppressions
  1. 0
    26
      src/com/dmdirc/Channel.java
  2. 0
    20
      src/com/dmdirc/logger/ProgramErrorManager.java

+ 0
- 26
src/com/dmdirc/Channel.java Voir le fichier

@@ -22,7 +22,6 @@
22 22
 
23 23
 package com.dmdirc;
24 24
 
25
-import com.dmdirc.config.ConfigBinding;
26 25
 import com.dmdirc.events.ChannelClosedEvent;
27 26
 import com.dmdirc.events.ChannelSelfActionEvent;
28 27
 import com.dmdirc.events.ChannelSelfJoinEvent;
@@ -81,12 +80,6 @@ public class Channel extends FrameContainer implements GroupChat {
81 80
     private final GroupChatUserManager groupChatUserManager;
82 81
     /** Whether we're in this channel or not. */
83 82
     private boolean isOnChannel;
84
-    /** Whether we should show mode prefixes in text. */
85
-    @ConfigBinding(domain = "channel", key = "showmodeprefix")
86
-    private volatile boolean showModePrefix;
87
-    /** Whether we should show colours in nicks. */
88
-    @ConfigBinding(domain = "ui", key = "shownickcoloursintext")
89
-    private volatile boolean showColours;
90 83
 
91 84
     /**
92 85
      * Creates a new instance of Channel.
@@ -117,8 +110,6 @@ public class Channel extends FrameContainer implements GroupChat {
117 110
         this.connection = connection;
118 111
         this.groupChatUserManager = groupChatUserManager;
119 112
 
120
-        getConfigManager().getBinder().bind(this, Channel.class);
121
-
122 113
         topics = EvictingQueue.create(
123 114
                 getConfigManager().getOptionInt("channel", "topichistorysize"));
124 115
 
@@ -269,7 +260,6 @@ public class Channel extends FrameContainer implements GroupChat {
269 260
 
270 261
         // Remove any callbacks or listeners
271 262
         eventHandler.unregisterCallbacks();
272
-        getConfigManager().getBinder().unbind(this);
273 263
 
274 264
         connection.getParser().map(Parser::getCallbackManager)
275 265
                 .ifPresent(cm -> cm.unsubscribe(eventHandler));
@@ -349,22 +339,6 @@ public class Channel extends FrameContainer implements GroupChat {
349 339
         getEventBus().publishAsync(new NickListUpdatedEvent(this));
350 340
     }
351 341
 
352
-    /**
353
-     * Returns a string containing the most important mode for the specified client.
354
-     *
355
-     * @param user The channel client to check.
356
-     *
357
-     * @return A string containing the most important mode, or an empty string if there are no
358
-     *         (known) modes.
359
-     */
360
-    private String getModes(final GroupChatUser user) {
361
-        if (user == null || !showModePrefix) {
362
-            return "";
363
-        } else {
364
-            return user.getImportantMode();
365
-        }
366
-    }
367
-
368 342
     // ---------------------------------------------------- TOPIC HANDLING -----
369 343
     /**
370 344
      * Adds the specified topic to this channel's topic list.

+ 0
- 20
src/com/dmdirc/logger/ProgramErrorManager.java Voir le fichier

@@ -33,11 +33,7 @@ import com.dmdirc.util.LogUtils;
33 33
 
34 34
 import ch.qos.logback.classic.spi.ILoggingEvent;
35 35
 
36
-import com.google.common.base.Throwables;
37
-
38 36
 import java.time.LocalDateTime;
39
-import java.util.ArrayList;
40
-import java.util.Arrays;
41 37
 import java.util.Collection;
42 38
 import java.util.Collections;
43 39
 import java.util.HashSet;
@@ -129,22 +125,6 @@ public class ProgramErrorManager {
129 125
         return error;
130 126
     }
131 127
 
132
-    /**
133
-     * Returns this errors trace.
134
-     *
135
-     * @return Error trace
136
-     */
137
-    private Iterable<String> getTrace(final String message, final Throwable throwable) {
138
-        final Collection<String> lines = new ArrayList<>();
139
-        if (message != null) {
140
-            lines.add(message);
141
-        }
142
-        if (throwable != null) {
143
-            lines.addAll(Arrays.asList(Throwables.getStackTraceAsString(throwable).split("\n")));
144
-        }
145
-        return lines;
146
-    }
147
-
148 128
     /**
149 129
      * Called when an error needs to be deleted from the list.
150 130
      *

Chargement…
Annuler
Enregistrer