Files
VRCT/src-ui/logics/configs/appearance/useShowResendButton.js
Sakamoto Shiina 3f38bfbba8 [Update] Resend Message Button: To be store-able the status.
Move to Appearance settings.
2025-06-15 17:49:42 +09:00

28 lines
939 B
JavaScript

import { useStore_ShowResendButton } from "@store";
import { useStdoutToPython } from "@useStdoutToPython";
export const useShowResendButton = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentShowResendButton, updateShowResendButton, pendingShowResendButton } = useStore_ShowResendButton();
const getShowResendButton = () => {
pendingShowResendButton();
asyncStdoutToPython("/get/data/show_resend_button");
};
const toggleShowResendButton = () => {
pendingShowResendButton();
if (currentShowResendButton.data) {
asyncStdoutToPython("/set/disable/show_resend_button");
} else {
asyncStdoutToPython("/set/enable/show_resend_button");
}
};
return {
currentShowResendButton,
getShowResendButton,
updateShowResendButton,
toggleShowResendButton,
};
};