Skip to content

Commit

Permalink
/
Browse files Browse the repository at this point in the history
  • Loading branch information
Rider21 committed Mar 8, 2024
1 parent 591d259 commit 6324050
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/screens/WebviewScreen/WebviewScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const WebviewScreen = ({ route, navigation }: WebviewScreenProps) => {
if (!e.loading) {
setTitle(e.title);
}
setLoading(e.loading)
setLoading(e.loading);
setCurrentUrl(e.url);
setCanGoBack(e.canGoBack);
setCanGoForward(e.canGoForward);
Expand Down Expand Up @@ -75,7 +75,7 @@ const WebviewScreen = ({ route, navigation }: WebviewScreenProps) => {
<Appbar
title={title}
theme={theme}
loading={loading && progress !== 1}
loading={loading}
currentUrl={currentUrl}
canGoBack={canGoBack}
canGoForward={canGoForward}
Expand All @@ -89,7 +89,7 @@ const WebviewScreen = ({ route, navigation }: WebviewScreenProps) => {
<ProgressBar
color={theme.primary}
progress={progress}
visible={loading && progress !== 1}
visible={loading}
/>
<WebView
userAgent={getUserAgent()}
Expand Down
6 changes: 3 additions & 3 deletions src/screens/WebviewScreen/components/Appbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ const Appbar: React.FC<AppbarProps> = ({
<TextTicker
style={{ color: theme.outline, fontSize: 16 }}
loop
scrollSpeed={50}
bounceSpeed={60}
scrollSpeed={45}
bounceSpeed={100}
marqueeDelay={1000}
bounceDelay={1000}
//isInteraction={false}
isInteraction={false}
disabled={loading}
>
{currentUrl}
Expand Down
12 changes: 6 additions & 6 deletions src/screens/WebviewScreen/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ const Menu: React.FC<MenuProps> = ({
webView,
setMenuVisible,
}) => {
const { top } = useSafeAreaInsets();

const insets = useSafeAreaInsets();
const url = currentUrl;
console.log(url, typeof url, typeof currentUrl);
return (
<Pressable
onPress={() => setMenuVisible(false)}
Expand All @@ -34,10 +35,9 @@ const Menu: React.FC<MenuProps> = ({
right: 0,
justifyContent: 'center',
alignItems: 'center',
//zIndex: 1,
}}
>
<View style={{ position: 'absolute', right: 0, top: top }}>
<View style={{ position: 'absolute', right: 0, top: insets.top }}>
<Pressable
style={{ backgroundColor: theme.surface2, padding: 15 }}
onPress={() => {
Expand All @@ -54,7 +54,7 @@ const Menu: React.FC<MenuProps> = ({
style={{ backgroundColor: theme.surface2, padding: 15 }}
onPress={() => {
setMenuVisible(false);
Share.share({ message: currentUrl });
Share.share({ message: url });
}}
>
<Text style={{ color: theme.onSurface }}>
Expand All @@ -66,7 +66,7 @@ const Menu: React.FC<MenuProps> = ({
style={{ backgroundColor: theme.surface2, padding: 15 }}
onPress={() => {
setMenuVisible(false);
Linking.openURL(currentUrl);
Linking.openURL(url);
}}
>
<Text style={{ color: theme.onSurface }}>
Expand Down

0 comments on commit 6324050

Please sign in to comment.