aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2021-12-25 14:13:27 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2021-12-25 14:13:27 +0700
commit4927d585ec72cb045a70718423228fa2cf55d071 (patch)
tree32714efb0c1a3a3aa3a01cadfc7a8ba5a9c784f1 /src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt
parentf720ca0a074411be7cbbdc1b9629b14d06e3b26c (diff)
downloadChatting-4927d585ec72cb045a70718423228fa2cf55d071.tar.gz
Chatting-4927d585ec72cb045a70718423228fa2cf55d071.tar.bz2
Chatting-4927d585ec72cb045a70718423228fa2cf55d071.zip
new: rewrite chat searching
fix: fix chat tabs / shortcuts not initializing when turning on
Diffstat (limited to 'src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt')
-rw-r--r--src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt b/src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt
index dfea873..10a2af9 100644
--- a/src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt
+++ b/src/main/kotlin/com/raeids/stratus/hook/ChatShortcuts.kt
@@ -9,10 +9,17 @@ object ChatShortcuts {
private val shortcutsFile = File(Stratus.modDir, "chatshortcuts.json")
private val PARSER = JsonParser()
+ private var initialized = false
+
val shortcuts = mutableSetOf<Pair<String, String>>()
fun initialize() {
+ if (initialized) {
+ return
+ } else {
+ initialized = true
+ }
if (!shortcutsFile.exists()) {
shortcutsFile.createNewFile()
shortcutsFile.writeText(