Fix: message type did not change.

This commit is contained in:
kawamataryo
2024-11-28 23:09:34 +09:00
parent 00b7d5f108
commit 9657996fdc
4 changed files with 30 additions and 5 deletions

View File

@@ -39,6 +39,7 @@ export const STORAGE_KEYS = {
BSKY_MESSAGE_NAME: `${STORAGE_PREFIX}_bsky_message_name`,
DETECTED_BSKY_USERS: `${STORAGE_PREFIX}_detected_bsky_users`,
LIST_NAME: `${STORAGE_PREFIX}_list_name`,
RENDER_KEY: `${STORAGE_PREFIX}_render_key`,
} as const;
export const TARGET_URLS_REGEX = {

View File

@@ -202,6 +202,17 @@ export const useBskyUserManager = () => {
return actionCount;
}, [filteredUsers, actionMode, setUsers]);
const [key] = useStorage<string>(
{
key: STORAGE_KEYS.RENDER_KEY,
instance: new Storage({
area: "local",
}),
},
(v) => (v === undefined ? "" : v),
);
// biome-ignore lint/correctness/useExhaustiveDependencies: force re-render option page
React.useEffect(() => {
chrome.storage.local.get(
[STORAGE_KEYS.BSKY_CLIENT_SESSION, STORAGE_KEYS.BSKY_MESSAGE_NAME],
@@ -215,7 +226,7 @@ export const useBskyUserManager = () => {
);
},
);
}, []);
}, [key]);
const matchTypeStats = React.useMemo(() => {
return Object.keys(matchTypeFilter).reduce(

View File

@@ -44,7 +44,7 @@ export class XService extends AbstractService {
? (document.querySelector('div[data-viewportview="true"]') as HTMLElement)
: document.documentElement;
const initialScrollHeight = scrollTarget.scrollHeight;
const initialScrollHeight = scrollTarget?.scrollHeight;
scrollTarget.scrollTop += initialScrollHeight;
await wait(3000);