mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-31 19:18:26 +01:00
Fix mark as played sheet logic being reversed (#443)
This commit is contained in:
@@ -46,7 +46,7 @@ export const PlayedStatus: React.FC<Props> = ({ item, ...props }) => {
|
|||||||
<RoundButton
|
<RoundButton
|
||||||
fillColor={item.UserData?.Played ? "primary" : undefined}
|
fillColor={item.UserData?.Played ? "primary" : undefined}
|
||||||
icon={item.UserData?.Played ? "checkmark" : "checkmark"}
|
icon={item.UserData?.Played ? "checkmark" : "checkmark"}
|
||||||
onPress={() => markAsPlayedStatus(item.UserData?.Played || false)}
|
onPress={() => markAsPlayedStatus(!item.UserData?.Played)}
|
||||||
size="large"
|
size="large"
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -51,17 +51,17 @@ export const useMarkAsPlayed = (item: BaseItemDto) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (played) {
|
if (played) {
|
||||||
await markAsNotPlayed({
|
await markAsPlayed({
|
||||||
api: api,
|
api: api,
|
||||||
itemId: item?.Id,
|
item: item,
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await markAsPlayed({
|
await markAsNotPlayed({
|
||||||
api: api,
|
api: api,
|
||||||
item: item,
|
itemId: item?.Id,
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
invalidateQueries();
|
invalidateQueries();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user