From 96eacfeda8c762fa06834f1c56a3548c4cfce01a Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Tue, 23 Feb 2016 18:16:54 +0100 Subject: [PATCH] Minor: another emoji --- core/src/main/kotlin/core/utilities/Emoji.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/kotlin/core/utilities/Emoji.kt b/core/src/main/kotlin/core/utilities/Emoji.kt index 8ba79bbdc9..c159db9f53 100644 --- a/core/src/main/kotlin/core/utilities/Emoji.kt +++ b/core/src/main/kotlin/core/utilities/Emoji.kt @@ -12,13 +12,14 @@ package core.utilities * A simple wrapper class that contains icons and support for printing them only when we're connected to a terminal. */ object Emoji { - val hasTerminal by lazy { System.getenv("TERM") != null && System.getenv("LANG").contains("UTF-8") } + val hasEmojiTerminal by lazy { System.getenv("TERM") != null && System.getenv("LANG").contains("UTF-8") } const val CODE_DIAMOND = "\ud83d\udd37" const val CODE_BAG_OF_CASH = "\ud83d\udcb0" const val CODE_NEWSPAPER = "\ud83d\udcf0" const val CODE_RIGHT_ARROW = "\u27a1\ufe0f" const val CODE_LEFT_ARROW = "\u2b05\ufe0f" + const val CODE_GREEN_TICK = "\u2705" /** * When non-null, toString() methods are allowed to use emoji in the output as we're going to render them to a @@ -33,7 +34,7 @@ object Emoji { val leftArrow: String get() = if (emojiMode.get() != null) "$CODE_LEFT_ARROW " else "" fun renderIfSupported(obj: Any): String { - if (!hasTerminal) + if (!hasEmojiTerminal) return obj.toString() if (emojiMode.get() != null)