Skip to content

Commit

Permalink
Issue #25: Removed touchable opacity auto highlighting and enhanc.
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0is1 committed Oct 16, 2024
1 parent 3527203 commit 5bd7e9f
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const AlbumItemsContainer = ({ trackList, playurlOverrider, queue }) => {
};

const renderAlbumItems = ({ item, index }) => (
<TouchableOpacity onPress={() => onItemPlayPressed(index)}>
<TouchableOpacity activeOpacity={1} onPress={() => onItemPlayPressed(index)}>
<View style={styles.albumItems}>
<Text
style={[
Expand Down
10 changes: 5 additions & 5 deletions src/screens/AlbumViewerScreen/components/PlayerFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const PlayerFooter = ({
return (
<Animated.View style={[styles.footer, { height: footerHeightAnim }]}>
<View style={styles.footercontainer}>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={handleOnRepeat}
style={[
styles.shuffleRepeatButtons,
Expand All @@ -87,13 +87,13 @@ const PlayerFooter = ({
<Feather name="repeat" size={25} color="black" />
</TouchableOpacity>
<View style={styles.playPauseControl}>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={[styles.prevButton, !albumMode && styles.prevNextSongMode]}
onPress={handleOnPrevious}
>
<Ionicons name="play-back" size={25} color="black" />
</TouchableOpacity>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.playPauseButtonContainer}
onPress={handlePlayPause}
>
Expand All @@ -112,14 +112,14 @@ const PlayerFooter = ({
color="white"
/>
</TouchableOpacity>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={[styles.nextButton, !albumMode && styles.prevNextSongMode]}
onPress={handleOnNext}
>
<Ionicons name="play-forward" size={25} color="black" />
</TouchableOpacity>
</View>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={handleOnShuffle}
style={[
styles.shuffleRepeatButtons,
Expand Down
10 changes: 5 additions & 5 deletions src/screens/AlbumViewerScreen/components/UtilityButtons.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ const UtilityButtons = ({ trackList }) => {
const navigation = useNavigation();
return (
<View style={styles.container}>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.button}
onPress={() => utilityButtonActions("like", { trackList, likedList })}
accessibilityLabel="Like"
>
<Ionicon name="heart" size={25} style={styles.icon} color={"red"} />
</TouchableOpacity>

<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={() =>
utilityButtonActions("play", {
trackList,
Expand All @@ -44,7 +44,7 @@ const UtilityButtons = ({ trackList }) => {
/>
</TouchableOpacity>

<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.button}
accessibilityLabel="Download"
onPress={() =>
Expand All @@ -54,7 +54,7 @@ const UtilityButtons = ({ trackList }) => {
<Octicons name="download" size={25} style={styles.icon} />
</TouchableOpacity>

<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.button}
accessibilityLabel="Listen with people"
onPress={() =>
Expand All @@ -64,7 +64,7 @@ const UtilityButtons = ({ trackList }) => {
<Ionicon name="people" size={25} style={styles.icon} />
</TouchableOpacity>

<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.button}
accessibilityLabel="Share"
onPress={() => utilityButtonActions("share", { trackList: trackList })}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/AlbumsScreen/components/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Card = ({ albumData, index }) => {
albumData.title = albumData.title ? albumData.title : albumData.name;

return (
<TouchableOpacity
<TouchableOpacity delayPressIn={100}
onPress={() =>
handleAlbum({
albumData: albumData,
Expand Down
4 changes: 2 additions & 2 deletions src/screens/AlbumsScreen/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const Navbar = () => {
};
return (
<View style={styles.searchInput}>
<TouchableOpacity onPress={handleDashboard}>
<TouchableOpacity activeOpacity={1} onPress={handleDashboard}>
<Feather name="menu" size={25} color="black" />
</TouchableOpacity>
<TouchableOpacity onPress={handleSearch}>
<TouchableOpacity activeOpacity={1} onPress={handleSearch}>
<Feather name="search" size={25} color="black" />
</TouchableOpacity>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/screens/DashboardScreen/components/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const Footer = (props) => {
Latest Version: {remoteVersion || "NaN"}
</Text>
</View>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={() => props.navigation.navigate("VersionScreen")}
disabled={!isUpdateAvailable}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React from "react";

const RightHeaderButton = ({ navigation, color }) => {
return (
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={{ marginRight: 15 }}
onPress={() => navigation.navigate("SearchScreen")}
>
Expand Down
6 changes: 3 additions & 3 deletions src/screens/FloatingPlayerScreen/FloatingPlayerScreen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const FloatingPlayerScreen = ({ playerInitialized }) => {
queue &&
queue[playingIndex] &&
shouldDisplay && (
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.container}
onPress={() => navigator.navigate("PlayerScreen")}
>
Expand Down Expand Up @@ -136,7 +136,7 @@ const FloatingPlayerScreen = ({ playerInitialized }) => {
</View>

<View style={styles.controls}>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.playPauseButtonContainer}
onPress={handlePlayPause}
>
Expand All @@ -157,7 +157,7 @@ const FloatingPlayerScreen = ({ playerInitialized }) => {
/>
</TouchableOpacity>

<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={[styles.nextButton]}
onPress={handleOnNext}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const AlbumItemsContainer = ({ playList, playurlOverrider }) => {
};

const renderAlbumItems = ({ item, index }) => (
<TouchableOpacity onPress={() => onItemPlayPressed(index)}>
<TouchableOpacity activeOpacity={1} onPress={() => onItemPlayPressed(index)}>
<View style={styles.albumItems}>
<Text
style={[
Expand Down
4 changes: 2 additions & 2 deletions src/screens/PlayerScreen/components/CustomStatusBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ const CustomStatusBar = () => {
const navigator = useNavigation();
return (
<View style={styles.buttonContainer}>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={() => {
navigator.goBack();
}}
style={styles.iconLeft}
>
<Ionicons name="chevron-back" size={25} color={"#000"} />
</TouchableOpacity>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={() => {
ToastAndroid.show("Not implemented yet", ToastAndroid.SHORT);
}}
Expand Down
10 changes: 5 additions & 5 deletions src/screens/PlayerScreen/components/PlayerFooter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const PlayerFooter = ({
return (
<Animated.View style={[styles.footer, { height: footerHeightAnim }]}>
<View style={styles.footercontainer}>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={handleOnRepeat}
style={[
styles.shuffleRepeatButtons,
Expand All @@ -87,13 +87,13 @@ const PlayerFooter = ({
<Feather name="repeat" size={25} color="black" />
</TouchableOpacity>
<View style={styles.playPauseControl}>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={[styles.prevButton, !albumMode && styles.prevNextSongMode]}
onPress={handleOnPrevious}
>
<Ionicons name="play-back" size={25} color="black" />
</TouchableOpacity>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={styles.playPauseButtonContainer}
onPress={handlePlayPause}
>
Expand All @@ -112,14 +112,14 @@ const PlayerFooter = ({
color="white"
/>
</TouchableOpacity>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
style={[styles.nextButton, !albumMode && styles.prevNextSongMode]}
onPress={handleOnNext}
>
<Ionicons name="play-forward" size={25} color="black" />
</TouchableOpacity>
</View>
<TouchableOpacity
<TouchableOpacity activeOpacity={1}
onPress={handleOnShuffle}
style={[
styles.shuffleRepeatButtons,
Expand Down
2 changes: 1 addition & 1 deletion src/screens/SearchScreen/components/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Navbar = ({ setSearchInput }) => {
};
return (
<View style={styles.searchContainer}>
<TouchableOpacity onPress={handleBack}>
<TouchableOpacity activeOpacity={1} onPress={handleBack}>
<Ionicons name="arrow-back" size={25} color="black" />
</TouchableOpacity>
<TextInput
Expand Down

0 comments on commit 5bd7e9f

Please sign in to comment.