Преглед на файлове

Merge pull request #610 from csmith/tidying

Tidy up some unused/uncommonly used methods.
pull/611/head
Greg Holmes преди 8 години
родител
ревизия
ae354aeeae
променени са 2 файла, в които са добавени 2 реда и са изтрити 26 реда
  1. 1
    25
      src/com/dmdirc/FrameContainer.java
  2. 1
    1
      src/com/dmdirc/ServerEventHandler.java

+ 1
- 25
src/com/dmdirc/FrameContainer.java Целия файл

@@ -430,19 +430,6 @@ public abstract class FrameContainer implements WindowModel {
430 430
      * @return True if any further behaviour should be executed, false otherwise
431 431
      */
432 432
     public boolean doNotification(final String messageType, final Object... args) {
433
-        return doNotification(new Date(), messageType, args);
434
-    }
435
-
436
-    /**
437
-     * Processes and displays a notification.
438
-     *
439
-     * @param date        The date/time at which the event occurred
440
-     * @param messageType The name of the formatter to be used for the message
441
-     * @param args        The arguments for the message
442
-     *
443
-     * @return True if any further behaviour should be executed, false otherwise
444
-     */
445
-    public boolean doNotification(final Date date, final String messageType, final Object... args) {
446 433
         final List<Object> messageArgs = new ArrayList<>();
447 434
         final List<Object> actionArgs = new ArrayList<>();
448 435
 
@@ -458,7 +445,7 @@ public abstract class FrameContainer implements WindowModel {
458 445
 
459 446
         modifyNotificationArgs(actionArgs, messageArgs);
460 447
 
461
-        handleNotification(date, messageType, messageArgs.toArray());
448
+        handleNotification(new Date(), messageType, messageArgs.toArray());
462 449
 
463 450
         return true;
464 451
     }
@@ -486,17 +473,6 @@ public abstract class FrameContainer implements WindowModel {
486 473
         return false;
487 474
     }
488 475
 
489
-    /**
490
-     * Handles general server notifications (i.e., ones not tied to a specific window). The user can
491
-     * select where the notifications should go in their config.
492
-     *
493
-     * @param messageType The type of message that is being sent
494
-     * @param args        The arguments for the message
495
-     */
496
-    public void handleNotification(final String messageType, final Object... args) {
497
-        handleNotification(new Date(), messageType, args);
498
-    }
499
-
500 476
     /**
501 477
      * Handles general server notifications (i.e., ones not tied to a specific window). The user can
502 478
      * select where the notifications should go in their config.

+ 1
- 1
src/com/dmdirc/ServerEventHandler.java Целия файл

@@ -258,7 +258,7 @@ public class ServerEventHandler extends EventHandler {
258 258
         final ServerNumericEvent coreEvent = new ServerNumericEvent(owner, event.getNumeric(),
259 259
                 event.getToken());
260 260
         final String format = EventUtils.postDisplayable(eventBus, coreEvent, target);
261
-        owner.handleNotification(format, (Object[]) event.getToken());
261
+        owner.handleNotification(event.getDate(), format, (Object[]) event.getToken());
262 262
     }
263 263
 
264 264
     @Handler

Loading…
Отказ
Запис