mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-02-13 07:42:24 +00:00
fix: invalidate cache on favorite
This commit is contained in:
@@ -28,7 +28,9 @@ export default function favorites() {
|
||||
paddingBottom: 16,
|
||||
}}
|
||||
>
|
||||
<Favorites />
|
||||
<View className="my-4">
|
||||
<Favorites />
|
||||
</View>
|
||||
</ScrollView>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ export const AddToFavorites: React.FC<Props> = ({ item, type, ...props }) => {
|
||||
},
|
||||
onSettled: () => {
|
||||
queryClient.invalidateQueries({ queryKey: [type, item.Id] });
|
||||
queryClient.invalidateQueries({ queryKey: ["home", "favorites"] });
|
||||
},
|
||||
});
|
||||
|
||||
@@ -90,6 +91,7 @@ export const AddToFavorites: React.FC<Props> = ({ item, type, ...props }) => {
|
||||
},
|
||||
onSettled: () => {
|
||||
queryClient.invalidateQueries({ queryKey: [type, item.Id] });
|
||||
queryClient.invalidateQueries({ queryKey: ["home", "favorites"] });
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user