Skip to content

Commit

Permalink
[bugfix] 修复每次更新也弹出welcome和tutorial的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
GarinZ committed Mar 17, 2023
1 parent b11150a commit d9fa2e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/background/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ try {
log.setLevel(__ENV__ === 'development' ? 'debug' : 'silent');

// ext安装后的状态
browser.runtime.onInstalled.addListener(async () => {
browser.runtime.onInstalled.addListener(async (details) => {
log.debug('Extension installed');
log.debug(__ENV__);
// 清除localStorage中的extPageInfo
await setIsNewUser(true);
if (details.reason === 'install') {
await setIsNewUser(true);
}
await removeExtPageInfo();
});

Expand Down

0 comments on commit d9fa2e0

Please sign in to comment.