Skip to content

Commit

Permalink
add clearOldItems arg
Browse files Browse the repository at this point in the history
  • Loading branch information
KentoNishi committed Sep 1, 2024
1 parent 8092edd commit ca236fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/Hyperchat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@
};
let key = '';
const initMessageStorage = async () => {
let tempKey = paramsArchiveKey || await findSavedMessageActionKey(paramsContinuation, $videoInfo);
let tempKey = paramsArchiveKey || await findSavedMessageActionKey(paramsContinuation, $videoInfo, true);
tempKey = tempKey === null ? getRandomString() : tempKey;
const newMsgs = await getSavedMessageDumpActions(tempKey);
if (newMsgs?.length) {
Expand Down
3 changes: 2 additions & 1 deletion src/ts/ytcf-logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,8 @@ export const deleteSavedMessageActions = async (key: string): Promise<void> => {

export const findSavedMessageActionKey = async (
continuation: string | null,
info: SimpleVideoInfo | null
info: SimpleVideoInfo | null,
clearOldItems = false
): Promise<string | null> => {
// return await new Promise((resolve) => {
// chrome.storage.local.get(null, (s) => {
Expand Down

0 comments on commit ca236fe

Please sign in to comment.