mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-19 09:06:02 -05:00
[Glitch] Fix unnecessary service worker registration and preloading when logged out
Port 894ce3726a38733ea7b8c880658b962f92d021ae to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
487689f062
commit
5394ca6807
@ -25,6 +25,7 @@ function main() {
|
|||||||
import('flavours/glitch/initial_state'),
|
import('flavours/glitch/initial_state'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (me) {
|
||||||
const wb = new Workbox('/sw.js');
|
const wb = new Workbox('/sw.js');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -35,7 +36,6 @@ function main() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (me) {
|
|
||||||
const registerPushNotifications = await import('flavours/glitch/actions/push_notifications');
|
const registerPushNotifications = await import('flavours/glitch/actions/push_notifications');
|
||||||
|
|
||||||
store.dispatch(registerPushNotifications.register());
|
store.dispatch(registerPushNotifications.register());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user