|
@@ -27,6 +27,9 @@ import com.dmdirc.addons.debug.Debug;
|
27
|
27
|
import com.dmdirc.addons.debug.DebugCommand;
|
28
|
28
|
import com.dmdirc.commandparser.CommandArguments;
|
29
|
29
|
import com.dmdirc.commandparser.commands.context.CommandContext;
|
|
30
|
+import com.dmdirc.ui.Colour;
|
|
31
|
+
|
|
32
|
+import com.google.common.base.Optional;
|
30
|
33
|
|
31
|
34
|
import javax.inject.Inject;
|
32
|
35
|
import javax.inject.Provider;
|
|
@@ -59,8 +62,14 @@ public class Notify extends DebugCommand {
|
59
|
62
|
@Override
|
60
|
63
|
public void execute(final FrameContainer origin,
|
61
|
64
|
final CommandArguments args, final CommandContext context) {
|
62
|
|
- sendLine(origin, args.isSilent(), FORMAT_OUTPUT,
|
63
|
|
- "Current notification colour is: " + origin.getNotification());
|
|
65
|
+ final Optional<Colour> colour = origin.getNotification();
|
|
66
|
+ if (colour.isPresent()) {
|
|
67
|
+ sendLine(origin, args.isSilent(), FORMAT_OUTPUT,
|
|
68
|
+ "Current notification colour is: " + colour.get());
|
|
69
|
+ } else {
|
|
70
|
+ sendLine(origin, args.isSilent(), FORMAT_OUTPUT,
|
|
71
|
+ "No current notification colour");
|
|
72
|
+ }
|
64
|
73
|
}
|
65
|
74
|
|
66
|
75
|
}
|