From d2bf27a85acae3aa68f5613cf6f22c27989186b1 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 11 Aug 2021 00:04:12 +0200 Subject: [PATCH 1/2] Fix some weird link --- src/components/openLink.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/openLink.ts b/src/components/openLink.ts index a5e041da..4edbdce8 100644 --- a/src/components/openLink.ts +++ b/src/components/openLink.ts @@ -123,14 +123,15 @@ const openLink = async ( loadingLink = false switch (getSettingsBrowser(store.getState())) { + // Some links might end with an empty space at the end that triggers an error case 'internal': - await WebBrowser.openBrowserAsync(url, { + await WebBrowser.openBrowserAsync(encodeURI(url), { dismissButtonStyle: 'close', enableBarCollapsing: true }) break case 'external': - await Linking.openURL(url) + await Linking.openURL(encodeURI(url)) break } } From 4b3855ab28412fc0ffa9861ebbd07ea8e2d2eb68 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 11 Aug 2021 00:17:37 +0200 Subject: [PATCH 2/2] Fixed #135 --- package.json | 2 +- .../Timeline/Shared/Attachment/Video.tsx | 18 +++++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index e26c7b54..1bf34b16 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "native": "210511", "major": 2, "minor": 1, - "patch": 1, + "patch": 2, "expo": "41.0.0" }, "description": "tooot app for Mastodon", diff --git a/src/components/Timeline/Shared/Attachment/Video.tsx b/src/components/Timeline/Shared/Attachment/Video.tsx index c678feaa..35ad16e9 100644 --- a/src/components/Timeline/Shared/Attachment/Video.tsx +++ b/src/components/Timeline/Shared/Attachment/Video.tsx @@ -84,16 +84,20 @@ const AttachmentVideo: React.FC = ({ })} useNativeControls={false} onFullscreenUpdate={event => { - if (event.fullscreenUpdate === 3) { - analytics('timeline_shared_attachment_video_pause_press', { - id: video.id, - timestamp: Date.now() - }) - videoPlayer.current?.pauseAsync() + if ( + event.fullscreenUpdate === + Video.FULLSCREEN_UPDATE_PLAYER_DID_DISMISS + ) { + if (gifv) { + videoPlayer.current?.setIsLoopingAsync(true) + videoPlayer.current?.playAsync() + } else { + videoPlayer.current?.pauseAsync() + } } }} /> - + {sensitiveShown ? ( video.blurhash ? (