diff options
author | 2022-01-15 22:37:07 +0800 | |
---|---|---|
committer | 2022-01-15 22:37:07 +0800 | |
commit | 10629932803eb8dbb9e57b3bb80d2c74b3a86194 (patch) | |
tree | a762c59d31a0f7301779e048a0f3e02caa64a1e7 /source/features/quick-repo-deletion.tsx | |
parent | e722aa956243ff84d2058b538ae85d9ecf2ab76b (diff) | |
download | refined-github-10629932803eb8dbb9e57b3bb80d2c74b3a86194.tar.gz refined-github-10629932803eb8dbb9e57b3bb80d2c74b3a86194.tar.zst refined-github-10629932803eb8dbb9e57b3bb80d2c74b3a86194.zip |
Clear `forked-to` cache after `quick-repo-deletion` (#5310)
Diffstat (limited to 'source/features/quick-repo-deletion.tsx')
-rw-r--r-- | source/features/quick-repo-deletion.tsx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/features/quick-repo-deletion.tsx b/source/features/quick-repo-deletion.tsx index 9ff1dced..89c75a34 100644 --- a/source/features/quick-repo-deletion.tsx +++ b/source/features/quick-repo-deletion.tsx @@ -1,6 +1,7 @@ import './quick-repo-deletion.css'; import delay from 'delay'; import React from 'dom-chef'; +import cache from 'webext-storage-cache'; import select from 'select-dom'; import delegate from 'delegate-it'; import elementReady from 'element-ready'; @@ -11,6 +12,7 @@ import * as api from '../github-helpers/api'; import {getRepo} from '../github-helpers'; import pluralize from '../helpers/pluralize'; import addNotice from '../github-widgets/notice-bar'; +import {getCacheKey} from './forked-to'; import looseParseInt from '../helpers/loose-parse-int'; import parseBackticks from '../github-helpers/parse-backticks'; @@ -103,6 +105,7 @@ async function start(buttonContainer: HTMLDetailsElement): Promise<void> { {action: false}, ); select('.application-main')!.remove(); + await cache.delete(getCacheKey()); if (document.hidden) { // Try closing the tab if in the background. Could fail, so we still update the UI above void browser.runtime.sendMessage({closeTab: true}); |