Chat: Add button for manual reloading

If automatic reloading doesn't work. Add this button to manually
reload the chat window. Only reload if a character chat is loaded.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-06-10 14:33:36 -04:00
parent 424ed9c1df
commit 75814dd50a
2 changed files with 11 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ import {
updateVisibleDivs,
eventSource,
event_types,
getCurrentChatId,
} from "../script.js";
import { favsToHotswap } from "./RossAscends-mods.js";
import {
@@ -1156,6 +1157,13 @@ $(document).ready(() => {
saveSettingsDebounced();
});
$("#reload_chat").on('click', function () {
const currentChatId = getCurrentChatId();
if (currentChatId !== undefined && currentChatId !== null) {
reloadCurrentChat();
}
});
$("#allow_name1_display").on("input", function () {
power_user.allow_name1_display = !!$(this).prop('checked');
reloadCurrentChat();