Skip to content

Commit

Permalink
update login pop-up scroll count to 5
Browse files Browse the repository at this point in the history
  • Loading branch information
adarsh-kumar-yral committed Aug 9, 2024
1 parent 02ea804 commit 9d04d82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ssr/src/page/post_view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ pub fn PostViewWithUpdates(initial_post: Option<PostDetails>) -> 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;
Expand Down
4 changes: 2 additions & 2 deletions ssr/src/page/post_view/video_loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -50,7 +50,7 @@ pub fn BgView(
style:background-color="rgb(0, 0, 0)"
style:background-image=move || format!("url({})", bg_url(uid()))
></div>
<Show when=move || { current_idx.get() != 0 && current_idx.get() % 4 == 0 && !is_connected.get() && show_login_popup.get() }>
<Show when=move || { current_idx.get() != 0 && current_idx.get() % 5 == 0 && !is_connected.get() && show_login_popup.get() }>
<FeedPopUp
on_click=move |_| set_show_login_popup.set(false)
header_text="Your 1000 COYNs
Expand Down

0 comments on commit 9d04d82

Please sign in to comment.