Commit 4c1b3b6 1 parent 993f1d4 commit 4c1b3b6 Copy full SHA for 4c1b3b6
File tree 1 file changed +5
-1
lines changed
src/controllers/WebRequest
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,11 @@ export async function onMissionReturnInstruction([details]: chrome.webRequest.We
29
29
}
30
30
31
31
export async function onMissionResult ( [ details ] : chrome . webRequest . WebRequestBodyDetails [ ] ) {
32
- log . info ( "onMissionResult" , details ) ;
32
+ const { api_deck_id : [ api_deck_id ] } = details . requestBody ?. formData as unknown as { api_deck_id : string [ ] , api_mission_id : string [ ] } ;
33
+ const notifications = await ( chrome . notifications as any ) . getAll ( ) as Promise < Record < string , boolean > > ;
34
+ for ( const id in notifications ) {
35
+ if ( id . match ( `/${ EntryType . MISSION } /${ api_deck_id } ` ) ) chrome . notifications . clear ( id ) ;
36
+ }
33
37
}
34
38
35
39
export async function onRecoveryStart ( [ details ] : chrome . webRequest . WebRequestBodyDetails [ ] ) {
You can’t perform that action at this time.
0 commit comments