[Refactor] Move the code that is related with Send Message Button Type. (It was remained at Others section but it should've move to Appearance section so.)

This commit is contained in:
Sakamoto Shiina
2025-06-15 18:11:07 +09:00
parent d96c9a5151
commit cbfce55c16
6 changed files with 30 additions and 54 deletions

View File

@@ -10,9 +10,9 @@ export const useSendMessageButtonType = () => {
asyncStdoutToPython("/get/data/send_message_button_type");
};
const setSendMessageButtonType = (selected_type) => {
const setSendMessageButtonType = (send_message_button_type) => {
pendingSendMessageButtonType();
asyncStdoutToPython("/set/data/send_message_button_type", selected_type);
asyncStdoutToPython("/set/data/send_message_button_type", send_message_button_type);
};
return {

View File

@@ -3,7 +3,7 @@ export { useDevice } from "./device/useDevice";
export { useMessageLogUiScaling } from "./appearance/useMessageLogUiScaling";
export { useSelectedFontFamily } from "./appearance/useSelectedFontFamily";
export { useTransparency } from "./appearance/useTransparency";
export { useSendMessageButtonType } from "./others/useSendMessageButtonType";
export { useSendMessageButtonType } from "./appearance/useSendMessageButtonType";
export { useShowResendButton } from "./appearance/useShowResendButton";
export { useUiLanguage } from "./appearance/useUiLanguage";
export { useUiScaling } from "./appearance/useUiScaling";

View File

@@ -1,24 +0,0 @@
import { useStore_SendMessageButtonType } from "@store";
import { useStdoutToPython } from "@useStdoutToPython";
export const useSendMessageButtonType = () => {
const { asyncStdoutToPython } = useStdoutToPython();
const { currentSendMessageButtonType, updateSendMessageButtonType, pendingSendMessageButtonType } = useStore_SendMessageButtonType();
const getSendMessageButtonType = () => {
pendingSendMessageButtonType();
asyncStdoutToPython("/get/data/send_message_button_type");
};
const setSendMessageButtonType = (send_message_button_type) => {
pendingSendMessageButtonType();
asyncStdoutToPython("/set/data/send_message_button_type", send_message_button_type);
};
return {
currentSendMessageButtonType,
getSendMessageButtonType,
setSendMessageButtonType,
updateSendMessageButtonType,
};
};