refactor: make mark as watched consistent with other app elements

This commit is contained in:
hiimkobeand 2024-08-12 11:19:03 +02:00
parent 4ef42f3b15
commit 99bff86dfe

View File

@ -127,7 +127,11 @@
ref="watchButton" ref="watchButton"
@click="toggleWatched(item.url.substr(-11))" @click="toggleWatched(item.url.substr(-11))"
> >
<i v-if="item.watched" :title="$t('actions.mark_as_unwatched')" class="i-fa6-solid:eye-slash" /> <i
v-if="item.watched && item.currentTime > item.duration * 0.9"
:title="$t('actions.mark_as_unwatched')"
class="i-fa6-solid:eye-slash"
/>
<i v-else :title="$t('actions.mark_as_watched')" class="i-fa6-solid:eye" /> <i v-else :title="$t('actions.mark_as_watched')" class="i-fa6-solid:eye" />
</button> </button>
<ConfirmModal <ConfirmModal
@ -247,7 +251,7 @@ export default {
}; };
} }
video.currentTime = video.currentTime =
instance.item.currentTime !== instance.item.duration ? instance.item.duration : 0; instance.item.currentTime < instance.item.duration * 0.9 ? instance.item.duration : 0;
store.put(video); store.put(video);
instance.$emit("update:watched", [instance.item.url]); instance.$emit("update:watched", [instance.item.url]);
instance.shouldShowVideo(); instance.shouldShowVideo();