Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Rider21 committed Mar 6, 2024
1 parent 287ce94 commit 6b80559
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
8 changes: 5 additions & 3 deletions src/screens/WebviewScreen/components/Appbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,19 @@ const Appbar: React.FC<AppbarProps> = ({
<View style={{ flex: 1, justifyContent: 'center' }}>
<Text
style={{
paddingLeft: 3,
color: theme.onSurface,
fontSize: 18,
}}
numberOfLines={1}
>
{title}
</Text>
<TextTicker
style={{ color: theme.outline }}
style={{ color: theme.outline, fontSize: 16 }}
loop
bounce
bounce={false}
scrollSpeed={200}
marqueeDelay={2000}
isInteraction={false}
>
Expand Down Expand Up @@ -107,7 +110,6 @@ const Appbar: React.FC<AppbarProps> = ({
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'rgba(0,0,0,0.62)',
}}
>
<Menu
Expand Down
13 changes: 8 additions & 5 deletions src/screens/WebviewScreen/components/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Pressable, Share, View, Text } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import { WebView } from 'react-native-webview';
import * as Linking from 'expo-linking';

Expand All @@ -20,10 +21,12 @@ const Menu: React.FC<MenuProps> = ({
webView,
setMenuVisible,
}) => {
const { top } = useSafeAreaInsets();

return (
<View style={{ position: 'absolute' }}>
<View style={{ position: 'absolute', right: 0, top }}>
<Pressable
style={{ backgroundColor: theme.surface2 }}
style={{ backgroundColor: theme.surface2, padding: 25, margin: 5 }}
onPress={() => {
setMenuVisible(false);
webView.current?.reload();
Expand All @@ -35,7 +38,7 @@ const Menu: React.FC<MenuProps> = ({
</Pressable>

<Pressable
style={{ backgroundColor: theme.surface2 }}
style={{ backgroundColor: theme.surface2, padding: 25, margin: 5 }}
onPress={() => {
setMenuVisible(false);
Share.share({ message: currentUrl });
Expand All @@ -47,7 +50,7 @@ const Menu: React.FC<MenuProps> = ({
</Pressable>

<Pressable
style={{ backgroundColor: theme.surface2 }}
style={{ backgroundColor: theme.surface2, padding: 25, margin: 5 }}
onPress={() => {
setMenuVisible(false);
Linking.openURL(currentUrl);
Expand All @@ -59,7 +62,7 @@ const Menu: React.FC<MenuProps> = ({
</Pressable>

<Pressable
style={{ backgroundColor: theme.surface2 }}
style={{ backgroundColor: theme.surface2, padding: 25, margin: 5 }}
onPress={() => {
setMenuVisible(false);
webView.current?.clearCache?.(true);
Expand Down

0 comments on commit 6b80559

Please sign in to comment.