Skip to content

Conversation

@CodFrm
Copy link
Member

@CodFrm CodFrm commented Dec 22, 2025

概述 Descriptions

close #1052

变更内容 Changes

截图 Screenshots

{...rest}
>
{icon && !imageError ? (
<img title={match} src={icon} onError={() => setImageError(true)} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不是在 fetchIcon 已经能知道是失败还是成功吗
不然怎储在OPFS?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确实如此,可以删了这个逻辑

Comment on lines -228 to -233
try {
const sessionBlobUrl = await cacheInstance.get<string>(`${CACHE_KEY_FAVICON}${filename}`);
if (sessionBlobUrl) return sessionBlobUrl;
} catch {
// 即使报错也不影响
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cyfung1031 这里是运行在option页面上的,刷新option页面,会释放掉,这里用了缓存第二次会返回无效的链接

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原來如此

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那就不cache每次都取opfs 做bloburl吧

@CodFrm CodFrm merged commit 2e5c601 into release/v1.3 Dec 24, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants