From ad25972774f7de8ef259f4d02cba011ff3737a2a Mon Sep 17 00:00:00 2001
From: austinried <4966622+austinried@users.noreply.github.com>
Date: Mon, 16 Aug 2021 11:05:38 +0900
Subject: [PATCH] remove/disable download options
---
app/components/ContextMenu.tsx | 18 ++---
app/components/ImageGradientBackground.tsx | 11 +++
app/components/ListItem.tsx | 18 ++---
app/components/ListPlayerControls.tsx | 5 +-
app/hooks/music.ts | 8 ---
app/hooks/trackplayer.ts | 4 +-
app/state/cache.ts | 82 ++++++++++++++--------
7 files changed, 84 insertions(+), 62 deletions(-)
diff --git a/app/components/ContextMenu.tsx b/app/components/ContextMenu.tsx
index bd9219a..f63497c 100644
--- a/app/components/ContextMenu.tsx
+++ b/app/components/ContextMenu.tsx
@@ -13,7 +13,7 @@ import FastImage from 'react-native-fast-image'
import { Menu, MenuOption, MenuOptions, MenuTrigger, renderers } from 'react-native-popup-menu'
import IconFA from 'react-native-vector-icons/FontAwesome'
import IconFA5 from 'react-native-vector-icons/FontAwesome5'
-import IconMat from 'react-native-vector-icons/MaterialIcons'
+// import IconMat from 'react-native-vector-icons/MaterialIcons'
import CoverArt from './CoverArt'
import Star from './Star'
@@ -200,11 +200,11 @@ const OptionViewAlbum = React.memo<{
)
})
-const OptionDownload = React.memo<{
- itemType: string
-}>(({ itemType }) => (
-
-))
+// const OptionDownload = React.memo<{
+// itemType: string
+// }>(({ itemType }) => (
+//
+// ))
export type AlbumContextPressableProps = ContextMenuProps & {
album: AlbumListItem
@@ -222,7 +222,7 @@ export const AlbumContextPressable: React.FC = props
<>
-
+ {/* */}
>
}>
{children}
@@ -247,7 +247,7 @@ export const SongContextPressable: React.FC = props =
-
+ {/* */}
>
}>
{children}
@@ -269,7 +269,7 @@ export const ArtistContextPressable: React.FC = pro
menuOptions={
<>
-
+ {/* */}
>
}>
{children}
diff --git a/app/components/ImageGradientBackground.tsx b/app/components/ImageGradientBackground.tsx
index 64c0330..cc0ac79 100644
--- a/app/components/ImageGradientBackground.tsx
+++ b/app/components/ImageGradientBackground.tsx
@@ -18,6 +18,7 @@ const ImageGradientBackground: React.FC<{
useEffect(() => {
async function getColors() {
+ console.log(`imagePath: ${imagePath}`)
if (imagePath === undefined) {
return
}
@@ -26,6 +27,7 @@ const ImageGradientBackground: React.FC<{
let res: AndroidImageColors
if (cachedResult) {
+ console.log(`cachedResult: ${JSON.stringify(cachedResult)}`)
res = cachedResult as AndroidImageColors
} else {
const path = `file://${imagePath}`
@@ -33,12 +35,21 @@ const ImageGradientBackground: React.FC<{
cache: true,
key: imagePath,
})) as AndroidImageColors
+ console.log(`res: ${JSON.stringify(res)}`)
}
if (res.muted && res.muted !== '#000000') {
setHighColor(res.muted)
} else if (res.darkMuted && res.darkMuted !== '#000000') {
setHighColor(res.darkMuted)
+ } else if (res.lightMuted && res.lightMuted !== '#000000') {
+ setHighColor(res.lightMuted)
+ } else if (res.vibrant && res.vibrant !== '#000000') {
+ setHighColor(res.vibrant)
+ } else if (res.darkVibrant && res.darkVibrant !== '#000000') {
+ setHighColor(res.darkVibrant)
+ } else if (res.lightVibrant && res.lightVibrant !== '#000000') {
+ setHighColor(res.lightVibrant)
}
}
getColors()
diff --git a/app/components/ListItem.tsx b/app/components/ListItem.tsx
index c5d66bf..239e633 100644
--- a/app/components/ListItem.tsx
+++ b/app/components/ListItem.tsx
@@ -26,12 +26,10 @@ const TitleTextSong = React.memo<{
return (
- {playing ? (
+ {playing && (
- ) : (
- <>>
)}
{title}
@@ -159,35 +157,29 @@ const ListItem: React.FC<{
return (
- {showArt ? coverArt : <>>}
+ {showArt && coverArt}
{title}
- {subtitle ? (
+ {subtitle !== undefined && (
- {starred ? (
+ {false && (
- ) : (
- <>>
)}
{subtitle}
- ) : (
- <>>
)}
- {showStar ? (
+ {showStar && (
- ) : (
- <>>
)}
diff --git a/app/components/ListPlayerControls.tsx b/app/components/ListPlayerControls.tsx
index 75f2009..5b15a85 100644
--- a/app/components/ListPlayerControls.tsx
+++ b/app/components/ListPlayerControls.tsx
@@ -22,7 +22,10 @@ const ListPlayerControls = React.memo<{
return (
-