Skip to content

Commit

Permalink
Removed unused track-player-event and reconfigured custom status bar UI
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0is1 committed Oct 13, 2024
1 parent 1286852 commit 911860e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/screens/PlayerScreen/PlayerScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ const PlayerScreen = () => {
}
}, [isTrackAddingCompleted]);

useTrackPlayerEvents([Event.PlaybackActiveTrackChanged], async (event) => {
const queueres = await TrackPlayer.getQueue();
setQueue(queueres);
});

return (
isTrackAddingCompleted && (
<View style={styles.container}>
Expand Down
15 changes: 12 additions & 3 deletions src/screens/PlayerScreen/components/CustomStatusBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { StyleSheet, ToastAndroid, TouchableOpacity, View } from "react-native";
import React from "react";
import Ionicons from "react-native-vector-icons/Ionicons";
import { useNavigation } from "@react-navigation/native";

const CustomStatusBar = () => {
const navigator = useNavigation();
return (
Expand All @@ -10,15 +11,15 @@ const CustomStatusBar = () => {
onPress={() => {
navigator.goBack();
}}
style={[styles.icons, { right: 140 }]}
style={styles.iconLeft}
>
<Ionicons name="chevron-back" size={25} color={"#000"} />
</TouchableOpacity>
<TouchableOpacity
onPress={() => {
ToastAndroid.show("Not implemented yet", ToastAndroid.SHORT);
}}
style={[styles.icons, { left: 140 }]}
style={styles.iconRight}
>
<Ionicons name="information" size={25} color={"#000"} />
</TouchableOpacity>
Expand All @@ -32,9 +33,17 @@ const styles = StyleSheet.create({
buttonContainer: {
position: "absolute",
flexDirection: "row",
justifyContent: "space-between",
top: 25,
width: "100%",
paddingHorizontal: 20,
},
iconLeft: {
borderRadius: 40,
alignSelf: 'flex-start',
},
icons: {
iconRight: {
borderRadius: 40,
alignSelf: 'flex-end',
},
});

0 comments on commit 911860e

Please sign in to comment.