Skip to content

Commit 96ce887

Browse files
authored
fix: fixed the san fab top icon on home screen for both scenarios whe… (#1004)
* fix: fixed the san fab top icon on home screen for both scenarios when the orientation changes and when screen resizes. * fix: fixed the registration issue.
1 parent 22f0447 commit 96ce887

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

infrastructure/eid-wallet/src-tauri/gen/android/.idea/deploymentTargetSelector.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/eid-wallet/src/routes/(app)/main/+page.svelte

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,21 @@ const scanFABVisible = $derived(tourStep === null || tourStep === "scan");
542542
// during earlier steps, and after FINISH.
543543
$effect(() => {
544544
if (typeof window === "undefined") return;
545-
if (tourStep !== "scan") {
546-
scanFABTop = restingScanFABTop();
545+
const handleViewPortChange = () => {
546+
if (tourStep !== "scan") {
547+
scanFABTop = restingScanFABTop();
548+
}
547549
}
550+
handleViewPortChange()
551+
// Attach listeners for both orientation change and general window resize
552+
window.addEventListener("orientationchange", handleViewPortChange);
553+
window.addEventListener("resize", handleViewPortChange);
554+
555+
// Clean up event listeners when the component is unmounted
556+
return () => {
557+
window.removeEventListener("orientationchange", handleViewPortChange);
558+
window.removeEventListener("resize", handleViewPortChange);
559+
};
548560
});
549561
550562
async function maybeShowNotifPrompt(welcomeTourSeen: boolean) {

0 commit comments

Comments
 (0)