diff --git a/code/modules/tgui_input/say_modal/modal.dm b/code/modules/tgui_input/say_modal/modal.dm index 3bfff57bd68..1185aaa12af 100644 --- a/code/modules/tgui_input/say_modal/modal.dm +++ b/code/modules/tgui_input/say_modal/modal.dm @@ -36,6 +36,7 @@ /datum/tgui_say/New(client/client, id) src.client = client window = new(client, id) + winset(client, "tgui_say", "size=1,1;is-visible=0;") window.subscribe(src, PROC_REF(on_message)) window.is_browser = TRUE @@ -62,11 +63,14 @@ */ /datum/tgui_say/proc/load() window_open = FALSE - winshow(client, "tgui_say", FALSE) + + winset(client, "tgui_say", "pos=848,500;size=231,30;is-visible=0;") + window.send_message("props", list( lightMode = client.prefs?.read_preference(/datum/preference/toggle/tgui_say_light_mode), maxLength = max_length, )) + stop_thinking() return TRUE @@ -84,9 +88,7 @@ window_open = TRUE if(payload["channel"] != OOC_CHANNEL && payload["channel"] != ADMIN_CHANNEL && payload["channel"] != LOOC_CHANNEL) // SKYRAT EDIT CHANGE (Add LOOC_CHANNEL) start_thinking() - if(client.typing_indicators) - log_speech_indicators("[key_name(client)] started typing at [loc_name(client.mob)], indicators enabled.") - else + if(!client.typing_indicators) log_speech_indicators("[key_name(client)] started typing at [loc_name(client.mob)], indicators DISABLED.") return TRUE @@ -97,9 +99,7 @@ /datum/tgui_say/proc/close() window_open = FALSE stop_thinking() - if(client.typing_indicators) - log_speech_indicators("[key_name(client)] stopped typing at [loc_name(client.mob)], indicators enabled.") - else + if(!client.typing_indicators) log_speech_indicators("[key_name(client)] stopped typing at [loc_name(client.mob)], indicators DISABLED.") /** diff --git a/tgui/packages/tgui-say/TguiSay.tsx b/tgui/packages/tgui-say/TguiSay.tsx index b2de8cea1a9..267febef650 100644 --- a/tgui/packages/tgui-say/TguiSay.tsx +++ b/tgui/packages/tgui-say/TguiSay.tsx @@ -4,7 +4,7 @@ import { Component, createRef, InfernoKeyboardEvent, RefObject } from 'inferno'; import { LINE_LENGTHS, RADIO_PREFIXES, WINDOW_SIZES } from './constants'; import { byondMessages } from './timers'; import { dragStartHandler } from 'tgui/drag'; -import { windowOpen, windowLoad, windowClose, windowSet } from './helpers'; +import { windowOpen, windowClose, windowSet } from './helpers'; import { BooleanLike } from 'common/react'; import { KEY } from 'common/keys'; @@ -68,7 +68,6 @@ export class TguiSay extends Component<{}, State> { Byond.subscribeTo('props', this.handleProps); Byond.subscribeTo('force', this.handleForceSay); Byond.subscribeTo('open', this.handleOpen); - windowLoad(); } handleArrowKeys(direction: KEY.Up | KEY.Down) { diff --git a/tgui/packages/tgui-say/helpers.ts b/tgui/packages/tgui-say/helpers.ts index 195d71a740a..100e3c03668 100644 --- a/tgui/packages/tgui-say/helpers.ts +++ b/tgui/packages/tgui-say/helpers.ts @@ -22,19 +22,6 @@ export const windowClose = () => { Byond.sendMessage('close'); }; -/** Some QoL to hide the window on load. Doesn't log this event */ -export const windowLoad = () => { - Byond.winset('tgui_say', { - pos: '848,500', - size: `${WINDOW_SIZES.width}x${WINDOW_SIZES.small}`, - visible: false, - }); - - Byond.winset('map', { - focus: true, - }); -}; - /** * Modifies the window size. */