Skip to content

Commit

Permalink
We only want to unregister our scoped sw
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-matt-hillsdon committed May 29, 2024
1 parent 9d81538 commit db73918
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/micropython-microbit-v2
Submodule micropython-microbit-v2 updated 54 files
+19 −16 .github/workflows/build.yml
+0 −1 .gitignore
+1 −1 lib/codal
+1 −1 lib/micropython
+6 −6 src/addlayouttable.py
+1 −1 src/codal.patch
+2 −1 src/codal_app/codal.json
+6 −0 src/codal_app/main.cpp
+43 −17 src/codal_app/microbithal.cpp
+12 −7 src/codal_app/microbithal.h
+22 −17 src/codal_app/microbithal_audio.cpp
+94 −0 src/codal_app/microbithal_microphone.cpp
+12 −8 src/codal_port/Makefile
+4 −0 src/codal_port/drv_display.c
+1 −1 src/codal_port/drv_image.c
+2 −0 src/codal_port/drv_radio.c
+2 −0 src/codal_port/drv_softtimer.c
+6 −6 src/codal_port/iters.c
+6 −6 src/codal_port/main.c
+120 −0 src/codal_port/make_microbit_version_hdr.py
+6 −5 src/codal_port/microbit_accelerometer.c
+6 −5 src/codal_port/microbit_button.c
+6 −5 src/codal_port/microbit_compass.c
+7 −7 src/codal_port/microbit_display.c
+17 −8 src/codal_port/microbit_i2c.c
+35 −33 src/codal_port/microbit_image.c
+138 −5 src/codal_port/microbit_microphone.c
+49 −23 src/codal_port/microbit_pin.c
+8 −0 src/codal_port/microbit_pinmode.c
+7 −6 src/codal_port/microbit_sound.c
+34 −8 src/codal_port/microbit_soundeffect.c
+13 −6 src/codal_port/microbit_soundevent.c
+6 −5 src/codal_port/microbit_speaker.c
+23 −14 src/codal_port/microbit_spi.c
+7 −6 src/codal_port/microbit_uart.c
+49 −53 src/codal_port/microbitfs.c
+2 −0 src/codal_port/modantigravity.c
+230 −99 src/codal_port/modaudio.c
+7 −5 src/codal_port/modaudio.h
+2 −0 src/codal_port/modlog.c
+2 −0 src/codal_port/modlove.c
+10 −9 src/codal_port/modmachine.c
+10 −6 src/codal_port/modmicrobit.c
+6 −2 src/codal_port/modmicrobit.h
+5 −0 src/codal_port/modmusic.c
+8 −6 src/codal_port/modos.c
+2 −0 src/codal_port/modpower.c
+3 −1 src/codal_port/modradio.c
+17 −1 src/codal_port/modspeech.c
+2 −0 src/codal_port/modthis.c
+0 −46 src/codal_port/modutime.c
+8 −66 src/codal_port/mpconfigport.h
+25 −2 src/codal_port/mphalport.h
+53 −0 src/test_record.py
11 changes: 4 additions & 7 deletions src/simulator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,10 @@ if ("serviceWorker" in navigator) {
if (flags.sw) {
initServiceWorker();
} else {
navigator.serviceWorker.getRegistrations().then((registrations) => {
if (registrations.length > 0) {
// We should only have one service worker to unregister.
registrations[0].unregister().then(() => {
window.location.reload();
});
}
navigator.serviceWorker.getRegistration().then((registration) => {
registration?.unregister().then(() => {
window.location.reload();
});
});
}
}
Expand Down

0 comments on commit db73918

Please sign in to comment.