mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
Minor: another emoji
This commit is contained in:
parent
c35d7794d8
commit
96eacfeda8
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user