Skip to content

Commit 044865e

Browse files
committed
fix: drawer swipe and simplify app url
1 parent eab2c91 commit 044865e

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

platforms/eReputation/client/src/lib/utils/mobile-detection.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,17 @@ export function getDeepLinkUrl(qrData: string): string {
2727
}
2828

2929
export function getAppStoreLink(): string {
30+
const defaultLink = "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet";
31+
3032
if (typeof window === 'undefined') {
31-
return "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet";
33+
return defaultLink;
3234
}
3335

3436
const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera;
3537

36-
if (/android/i.test(userAgent)) {
37-
return "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet";
38-
}
39-
4038
if (/iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream) {
4139
return "https://apps.apple.com/in/app/eid-for-w3ds/id6747748667";
4240
}
4341

44-
return "https://play.google.com/store/apps/details?id=foundation.metastate.eid_wallet";
42+
return defaultLink;
4543
}

platforms/pictique/src/lib/fragments/Drawer/Drawer.svelte

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,19 @@
1919
if (drawer) drawer.destroy({ animate: true });
2020
}
2121
22-
const handleDrawerSwipe = (event: SwipeCustomEvent) => {
23-
if (event.detail.direction === ('down' as string)) {
24-
drawer?.destroy({ animate: true });
25-
}
26-
};
22+
function downSwipeHandler() {
23+
drawer?.destroy({ animate: true });
24+
}
2725
2826
const swipeResult = useSwipe(
29-
handleDrawerSwipe,
27+
() => {},
3028
() => ({
3129
timeframe: 300,
3230
minSwipeDistance: 60
3331
}),
34-
undefined,
35-
true
32+
{
33+
onswipedown: downSwipeHandler
34+
}
3635
);
3736
const swipe = swipeResult.swipe as any;
3837

0 commit comments

Comments
 (0)