mirror of
https://github.com/iv-org/invidious.git
synced 2025-12-25 15:18:29 -06:00
refactor: mark as watched on page load when the mark_watched_after_duration feature is disabled
This commit is contained in:
parent
42c557d99b
commit
d372a59394
@ -67,6 +67,10 @@ module Invidious::Routes::Watch
|
||||
end
|
||||
env.params.query.delete_all("iv_load_policy")
|
||||
|
||||
if watched && preferences.watch_history && !preferences.mark_watched_after_duration
|
||||
Invidious::Database::Users.mark_watched(user.as(User), id)
|
||||
end
|
||||
|
||||
if CONFIG.enable_user_notifications && notifications && notifications.includes? id
|
||||
Invidious::Database::Users.remove_notification(user.as(User), id)
|
||||
env.get("user").as(User).notifications.delete(id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user