diff --git a/plugins/BetterSpotifyIntegration/manifest.json b/plugins/BetterSpotifyIntegration/manifest.json new file mode 100644 index 0000000..011e41c --- /dev/null +++ b/plugins/BetterSpotifyIntegration/manifest.json @@ -0,0 +1,6 @@ +{ + "name": "BetterSpotifyIntegration", + "description": "Shrimply better integration with Spotify", + "vendetta": { }, + "main": "src/index.tsx" +} diff --git a/plugins/BetterSpotifyIntegration/src/components/ListenAlongButton.tsx b/plugins/BetterSpotifyIntegration/src/components/ListenAlongButton.tsx new file mode 100644 index 0000000..6e5b677 --- /dev/null +++ b/plugins/BetterSpotifyIntegration/src/components/ListenAlongButton.tsx @@ -0,0 +1,38 @@ +import { findByProps, findByStoreName } from "@vendetta/metro"; +import { getAssetIDByName } from "@vendetta/ui/assets"; +import { Image, View } from "react-native"; + +const FluxUtils = findByProps("useStateFromStores"); +const SpotifyStore = findByStoreName("SpotifyStore"); + +const Button = findByProps("Sizes", "Looks") as any; +const SpotifySyncUtil = findByProps("play", "sync"); + +interface ListenAlongButtonProps { + activity: any; + user: any; + isCurrentUser: boolean; + activityButtonColor: string; +} + +export default function ListenAlongButton(props: ListenAlongButtonProps) { + const currentPartyId = FluxUtils.useStateFromStores([SpotifyStore], () => SpotifyStore.getActivity()?.party?.id); + const alreadySync = props.isCurrentUser || props.activity?.party?.id === currentPartyId; + + return +