Skip to content

Commit 73f97ae

Browse files
authored
Merge pull request #1 from sheeshcake/fix/ui-fixes
Release: 1.0.1
2 parents 69ed1e3 + d4a2672 commit 73f97ae

16 files changed

+625
-133
lines changed

App.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
import React from 'react';
22
import {StatusBar} from 'react-native';
3+
import {GestureHandlerRootView} from 'react-native-gesture-handler';
34
import {AppProvider} from './src/context';
45
import {AppNavigator} from './src/navigation';
56

67
function App(): React.JSX.Element {
78
return (
8-
<AppProvider>
9-
<StatusBar barStyle="light-content" backgroundColor="#000000" />
10-
<AppNavigator />
11-
</AppProvider>
9+
<GestureHandlerRootView style={{flex: 1}}>
10+
<AppProvider>
11+
<StatusBar barStyle="light-content" backgroundColor="#000000" />
12+
<AppNavigator />
13+
</AppProvider>
14+
</GestureHandlerRootView>
1215
);
1316
}
1417

android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ android {
8383
minSdkVersion rootProject.ext.minSdkVersion
8484
targetSdkVersion rootProject.ext.targetSdkVersion
8585
versionCode 1
86-
versionName "1.0.0"
86+
versionName "1.0.1"
8787
}
8888
signingConfigs {
8989
debug {

android/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
1414
org.gradle.daemon.performance.disable-logging=true
1515

16-
16+
# NDK version
17+
android.ndkVersion=27.1.12297006
1718
# When configured, Gradle will run in incubating parallel mode.
1819
# This option should only be used with decoupled projects. More details, visit
1920
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects

babel.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
module.exports = {
22
presets: ['module:@react-native/babel-preset'],
3+
plugins: ['react-native-reanimated/plugin'],
34
};

package-lock.json

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

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"log:android": "react-native log-android"
1414
},
1515
"dependencies": {
16+
"@gorhom/bottom-sheet": "^5.2.6",
1617
"@kesha-antonov/react-native-background-downloader": "^3.2.6",
1718
"@react-native-async-storage/async-storage": "^2.2.0",
1819
"@react-native-community/netinfo": "^11.4.1",
@@ -32,12 +33,14 @@
3233
"react-native-google-cast": "^4.9.1",
3334
"react-native-linear-gradient": "^2.8.3",
3435
"react-native-orientation-locker": "^1.7.0",
36+
"react-native-reanimated": "^4.1.5",
3537
"react-native-safe-area-context": "^5.5.2",
3638
"react-native-screens": "^4.18.0",
3739
"react-native-svg": "^15.14.0",
3840
"react-native-vector-icons": "^10.2.0",
3941
"react-native-video": "^6.18.0",
4042
"react-native-webview": "^13.16.0",
43+
"react-native-worklets": "^0.6.1",
4144
"wyzie-lib": "^2.2.5"
4245
},
4346
"devDependencies": {

src/components/ContinueWatchingCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ interface ContinueWatchingCardProps {
1616
watchProgress: WatchProgress;
1717
onPress: (item: Movie | TVShow, progress: WatchProgress) => void;
1818
size?: 'small' | 'medium' | 'large';
19+
type: 'movie' | 'tv';
1920
}
2021

2122
const { width: screenWidth } = Dimensions.get('window');
@@ -24,6 +25,7 @@ const ContinueWatchingCard: React.FC<ContinueWatchingCardProps> = ({
2425
watchProgress,
2526
onPress,
2627
size = 'medium',
28+
type,
2729
}) => {
2830
const [content, setContent] = useState<Movie | TVShow | null>(null);
2931
const [loading, setLoading] = useState(true);
@@ -144,7 +146,7 @@ const ContinueWatchingCard: React.FC<ContinueWatchingCardProps> = ({
144146
style={{ flexDirection: 'row', justifyContent: 'space-between' }}
145147
>
146148
<Text style={styles.progressText}>{progressPercentage}%</Text>
147-
{'season' in watchProgress && 'episode' in watchProgress && (
149+
{type === 'tv' && 'season' in watchProgress && 'episode' in watchProgress && (
148150
<Text style={styles.progressText}>
149151
S{watchProgress.season} · E{watchProgress.episode}
150152
</Text>

src/components/ContinueWatchingList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const ContinueWatchingList: React.FC<ContinueWatchingListProps> = ({
3333
watchProgress={item}
3434
onPress={onItemPress}
3535
size={cardSize}
36+
type={item.contentType as 'movie' | 'tv'}
3637
/>
3738
);
3839

src/components/CreditsModal/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const CreditsModal: React.FC<CreditsModalProps> = ({ isOpen, onClose }) => {
5050
style={styles.logo}
5151
resizeMode="contain"
5252
/>
53-
<Text style={styles.versionText}>1.0.0</Text>
53+
<Text style={styles.versionText}>1.0.1</Text>
5454
<ScrollView>
5555
<Text style={styles.sectionTitle}>
5656
What is Flick?

src/components/DownloadComponents.tsx

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
ScrollView,
99
Image,
1010
} from 'react-native';
11+
import RNFS from 'react-native-fs';
12+
import { TMDBService } from '../services/TMDBService';
1113
import Svg, { Circle } from 'react-native-svg';
1214
import Icon from 'react-native-vector-icons/MaterialIcons';
1315
import {
@@ -20,6 +22,62 @@ import {
2022
import { downloadService } from '../services';
2123
import { COLORS } from '../utils/constants';
2224

25+
// Helper component: DownloadThumbnail - resolves local file or TMDB fallback
26+
const DownloadThumbnail: React.FC<{ download: DownloadItem }> = ({ download }) => {
27+
const [uri, setUri] = useState<string | null>(null);
28+
29+
useEffect(() => {
30+
let mounted = true;
31+
const tmdb = new TMDBService();
32+
33+
const resolve = async () => {
34+
try {
35+
if (download.thumbnailPath) {
36+
const exists = await RNFS.exists(download.thumbnailPath);
37+
if (exists && mounted) {
38+
setUri(`file://${download.thumbnailPath}`);
39+
return;
40+
}
41+
}
42+
43+
// fallback to TMDB poster or backdrop
44+
if (download.posterPath) {
45+
const remote = tmdb.getImageUrl(download.posterPath);
46+
if (mounted) setUri(remote);
47+
return;
48+
}
49+
50+
if (download.backdropPath) {
51+
const remote = tmdb.getImageUrl(download.backdropPath);
52+
if (mounted) setUri(remote);
53+
return;
54+
}
55+
56+
setUri(null);
57+
} catch (error) {
58+
console.warn('Failed to resolve download thumbnail:', error);
59+
if (mounted) setUri(null);
60+
}
61+
};
62+
63+
resolve();
64+
65+
return () => { mounted = false; };
66+
}, [download]);
67+
68+
if (!uri) {
69+
return (
70+
<View style={styles.placeholderImage}>
71+
<Icon name="movie" size={32} color={COLORS.NETFLIX_GRAY} />
72+
</View>
73+
);
74+
}
75+
76+
return (
77+
<Image source={{ uri }} style={styles.thumbnail} resizeMode="cover" />
78+
);
79+
};
80+
2381
interface CircularProgressProps {
2482
size: number;
2583
progress: number;
@@ -613,17 +671,7 @@ export const DownloadsList: React.FC<DownloadsListProps> = ({
613671
activeOpacity={0.7}
614672
>
615673
<View style={styles.downloadImage}>
616-
{download.thumbnailPath ? (
617-
<Image
618-
source={{ uri: `file://${download.thumbnailPath}` }}
619-
style={styles.thumbnail}
620-
resizeMode="cover"
621-
/>
622-
) : (
623-
<View style={styles.placeholderImage}>
624-
<Icon name="movie" size={32} color={COLORS.NETFLIX_GRAY} />
625-
</View>
626-
)}
674+
<DownloadThumbnail download={download} />
627675

628676
{download.status === DownloadStatus.DOWNLOADING && (
629677
<View style={styles.progressOverlay}>

0 commit comments

Comments
 (0)