From 9d04d8280bd14108c4202d8c08a80b14bc46947c Mon Sep 17 00:00:00 2001 From: adarsh-rs Date: Thu, 8 Aug 2024 11:55:33 +0530 Subject: [PATCH] update login pop-up scroll count to 5 --- ssr/src/page/post_view/mod.rs | 2 +- ssr/src/page/post_view/video_loader.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ssr/src/page/post_view/mod.rs b/ssr/src/page/post_view/mod.rs index b6a568aa..37c54657 100644 --- a/ssr/src/page/post_view/mod.rs +++ b/ssr/src/page/post_view/mod.rs @@ -176,7 +176,7 @@ pub fn PostViewWithUpdates(initial_post: Option) -> impl IntoView { video_queue.update_untracked(|v| { if v.len() > 1 { // Safe to do a GC here - let rem = 0..(current_idx.get_untracked().saturating_sub(5)); + let rem = 0..(current_idx.get_untracked().saturating_sub(6)); current_idx.update(|c| *c -= rem.len()); v.drain(rem); return; diff --git a/ssr/src/page/post_view/video_loader.rs b/ssr/src/page/post_view/video_loader.rs index f38eaa22..74f61b6b 100644 --- a/ssr/src/page/post_view/video_loader.rs +++ b/ssr/src/page/post_view/video_loader.rs @@ -35,7 +35,7 @@ pub fn BgView( let (referrer_store, _, _) = use_referrer_store(); create_effect(move |_| { - if current_idx.get() % 4 != 0 { + if current_idx.get() % 5 != 0 { set_show_login_popup.update(|n| *n = false); } else { set_show_login_popup.update(|n| *n = true); @@ -50,7 +50,7 @@ pub fn BgView( style:background-color="rgb(0, 0, 0)" style:background-image=move || format!("url({})", bg_url(uid())) > - +