Skip to content

Commit a2b39c4

Browse files
committed
feat(android): immersive mode
1 parent 9519d00 commit a2b39c4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/components/map/Map.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@
522522
const intentFilter = new android.content.IntentFilter();
523523
intentFilter.addAction(android.content.Intent.ACTION_SCREEN_OFF);
524524
intentFilter.addAction(android.content.Intent.ACTION_USER_PRESENT);
525-
activity.registerReceiver(screenOnOffReceiver, intentFilter);
525+
Application.android.startActivity.registerReceiver(screenOnOffReceiver, intentFilter);
526526
}
527527
528528
}
@@ -602,8 +602,8 @@
602602
});
603603
$: {
604604
if (__ANDROID__) {
605-
if (screenOnOffReceiver && !$immersiveOnlyLocked){
606-
toggleSystemBarsWithWindowCompat($immersive)
605+
if (screenOnOffReceiver){
606+
toggleSystemBarsWithWindowCompat(!$immersive || $immersiveOnlyLocked)
607607
608608
}
609609
}

0 commit comments

Comments
 (0)