Skip to content

Commit

Permalink
TGS Test Merge (#8361)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Feb 8, 2025
2 parents 661866b + 046e23a commit d55eec7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tgui/packages/tgui-panel/chat/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const COMBINE_MAX_TIME_WINDOW = 5000;
export const IMAGE_RETRY_DELAY = 250;
export const IMAGE_RETRY_LIMIT = 10;
export const IMAGE_RETRY_MESSAGE_AGE = 60000;
export const RENDERER_RELOAD_WAIT = 1000;

// Remove with 516
export const RENDERER_RELOAD_WAIT_TRIDENT = 2500;

// Default message type
export const MESSAGE_TYPE_UNKNOWN = 'unknown';
Expand Down
11 changes: 11 additions & 0 deletions tgui/packages/tgui-panel/chat/renderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
MESSAGE_TYPE_INTERNAL,
MESSAGE_TYPE_UNKNOWN,
MESSAGE_TYPES,
RENDERER_RELOAD_WAIT,
RENDERER_RELOAD_WAIT_TRIDENT,
} from './constants';
import { canPageAcceptType, createMessage, isSameMessage } from './model';
import { highlightNode, linkifyNode } from './replaceInTextNode';
Expand Down Expand Up @@ -634,3 +636,12 @@ if (!window.__chatRenderer__) {

/** @type {ChatRenderer} */
export const chatRenderer = window.__chatRenderer__;

setTimeout(
() => {
if (!chatRenderer.isReady()) {
location.reload();
}
},
Byond.TRIDENT ? RENDERER_RELOAD_WAIT_TRIDENT : RENDERER_RELOAD_WAIT,
);

0 comments on commit d55eec7

Please sign in to comment.