Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions src/app/Schedule/ArchivedShowView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
TouchableOpacity,
StyleSheet,
ScrollView,
SafeAreaView,
StatusBar,
ActivityIndicator,
Alert,
Expand Down Expand Up @@ -228,8 +227,8 @@ export default function ArchivedShowView() {
locations={[0, 0.3, 1]}
style={styles.gradient}
>
<SafeAreaView style={[styles.safeArea, { paddingTop: headerHeight }]}>
<ScrollView style={styles.scrollView}>
<ScrollView>
<View style={[{ paddingTop: headerHeight }]}>
<ShowImage showName={show.name} archiveDate={archive.date} />

{/* Playback Controls */}
Expand Down Expand Up @@ -369,10 +368,8 @@ export default function ArchivedShowView() {
</View>
)}
</View>

<View style={styles.bottomPadding} />
</ScrollView>
</SafeAreaView>
</View>
</ScrollView>
</LinearGradient>
</>
);
Expand All @@ -382,12 +379,6 @@ const styles = StyleSheet.create({
gradient: {
flex: 1,
},
safeArea: {
flex: 1,
},
scrollView: {
flex: 1,
},
playSection: {
flexDirection: 'row',
alignItems: 'center',
Expand Down Expand Up @@ -497,9 +488,6 @@ const styles = StyleSheet.create({
color: COLORS.TEXT.TERTIARY,
fontSize: 16,
},
bottomPadding: {
height: 100,
},
progressSection: {
paddingHorizontal: 20,
paddingVertical: 16,
Expand Down
26 changes: 4 additions & 22 deletions src/app/Schedule/SchedulePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
TouchableOpacity,
StyleSheet,
ScrollView,
SafeAreaView,
StatusBar,
ActivityIndicator,
TextInputChangeEvent,
Expand All @@ -14,7 +13,7 @@
import Icon from 'react-native-vector-icons/Ionicons';
import LinearGradient from 'react-native-linear-gradient';
import { debugLog, debugError } from '@utils/Debug';
import { RefreshControl } from 'react-native';

Check failure on line 16 in src/app/Schedule/SchedulePage.tsx

View workflow job for this annotation

GitHub Actions / Lint (non-blocking)

'RefreshControl' is defined but never used
import { NavigationProp, useNavigation } from '@react-navigation/native';
import { useHeaderHeight } from '@react-navigation/elements';
import { ScheduleShow, ScheduleResponse } from '@customTypes/Schedule';
Expand All @@ -34,7 +33,7 @@
const [loading, setLoading] = useState(true);
const [error, setError] = useState<string | null>(null);
const [searchQuery, setSearchQuery] = useState('');
const scrollViewRef = useRef<ScrollView>(null);

Check failure on line 36 in src/app/Schedule/SchedulePage.tsx

View workflow job for this annotation

GitHub Actions / Lint (non-blocking)

'scrollViewRef' is assigned a value but never used

const scheduleService = ScheduleService.getInstance();
const recentlyPlayedService = RecentlyPlayedService.getInstance();
Expand Down Expand Up @@ -86,8 +85,8 @@
}, [fetchSchedule]);

// Pull to refresh
const [refreshing, setRefreshing] = useState(false);

Check failure on line 88 in src/app/Schedule/SchedulePage.tsx

View workflow job for this annotation

GitHub Actions / Lint (non-blocking)

'refreshing' is assigned a value but never used. Allowed unused elements of array destructuring patterns must match /^_/u
const onRefresh = useCallback(async () => {

Check failure on line 89 in src/app/Schedule/SchedulePage.tsx

View workflow job for this annotation

GitHub Actions / Lint (non-blocking)

'onRefresh' is assigned a value but never used
setRefreshing(true);
try {
const scheduleData = await scheduleService.fetchSchedule();
Expand Down Expand Up @@ -325,14 +324,8 @@
locations={[0, 0.5, 1]}
style={styles.gradient}
>
<SafeAreaView style={[styles.safeArea, { paddingTop: headerHeight }]}>
<ScrollView
ref={scrollViewRef}
style={styles.scrollView}
refreshControl={
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
}
>
<ScrollView>
<View style={[{ paddingTop: headerHeight }]}>
{loading ? (
<View style={styles.loadingContainer}>
<ActivityIndicator size="large" color="#FFFFFF" />
Expand All @@ -358,10 +351,8 @@
{renderShowsByDay()}
</View>
)}

<View style={styles.bottomPadding} />
</ScrollView>
</SafeAreaView>
</View>
</ScrollView>
</LinearGradient>
</>
);
Expand All @@ -371,12 +362,6 @@
gradient: {
flex: 1,
},
safeArea: {
flex: 1,
},
scrollView: {
flex: 1,
},
loadingContainer: {
alignItems: 'center',
paddingVertical: 40,
Expand Down Expand Up @@ -494,9 +479,6 @@
currentShowDescription: {
color: COLORS.TEXT.SECONDARY,
},
bottomPadding: {
height: 100,
},
debugText: {
color: COLORS.TEXT.PRIMARY,
fontSize: 14,
Expand Down
20 changes: 4 additions & 16 deletions src/app/Schedule/ShowDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
StyleSheet,
Dimensions,
ScrollView,
SafeAreaView,
StatusBar,
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
Expand Down Expand Up @@ -296,8 +295,8 @@ export default function ShowDetailsPage() {
locations={[0, 0.3, 1]}
style={styles.gradient}
>
<SafeAreaView style={[styles.safeArea, { paddingTop: headerHeight }]}>
<ScrollView style={styles.scrollView}>
<ScrollView>
<View style={[{ paddingTop: headerHeight }]}>
<ShowImage showName={show.name} />

{/* Show Info */}
Expand Down Expand Up @@ -448,10 +447,8 @@ export default function ShowDetailsPage() {
</View>
)}
</View>

<View style={styles.bottomPadding} />
</ScrollView>
</SafeAreaView>
</View>
</ScrollView>
</LinearGradient>
</>
);
Expand All @@ -461,12 +458,6 @@ const styles = StyleSheet.create({
gradient: {
flex: 1,
},
safeArea: {
flex: 1,
},
scrollView: {
flex: 1,
},
infoSection: {
paddingHorizontal: 20,
paddingBottom: 30,
Expand Down Expand Up @@ -606,7 +597,4 @@ const styles = StyleSheet.create({
fontSize: 16,
fontStyle: 'italic',
},
bottomPadding: {
height: 100,
},
});
8 changes: 8 additions & 0 deletions src/app/Schedule/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createNativeStackNavigator } from '@react-navigation/native-stack';
import ArchivedShowView from './ArchivedShowView';
import ShowDetailsPage from './ShowDetailsPage';
import SchedulePage from './SchedulePage';
import { Platform } from 'react-native';
import { COLORS } from '@utils/Colors';

const Stack = createNativeStackNavigator();
Expand Down Expand Up @@ -38,6 +39,13 @@ export const ScheduleStack = () => {
screenOptions={{
headerShown: true,
headerTransparent: true,
// Android doesn't do header blur effects, so it needs a solid
// background color
...(Platform.OS === 'android' && {
headerStyle: {
backgroundColor: COLORS.BACKGROUND.PRIMARY,
},
}),
title: 'Schedule',
headerTintColor: '#ffffff',
}}
Expand Down
Loading