From 92d3f5cf225395e19b68a1557dfb4ed04fcfd465 Mon Sep 17 00:00:00 2001 From: 112batuhan Date: Sun, 8 Dec 2024 14:45:12 +0300 Subject: [PATCH] feat: updated activity logic to prevent multiple beatmap edits to show up --- src/handlers/activity.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/handlers/activity.rs b/src/handlers/activity.rs index 8ae07c2..447b416 100644 --- a/src/handlers/activity.rs +++ b/src/handlers/activity.rs @@ -182,7 +182,7 @@ impl ActivityTracker { ActivityType::AddUserBeatmap { beatmap: new_beatmap, } => { - let max_false = 5; + let max_false = 1; let mut current_false = 0; let matched = locked_queue.iter().any(|old_activity| { new_activity.user.id == old_activity.user.id @@ -191,7 +191,7 @@ impl ActivityTracker { beatmap: old_beatmap, } => { if new_beatmap.get_id() != old_beatmap.get_id() - && current_false < max_false + && current_false <= max_false { current_false += 1; false @@ -259,7 +259,7 @@ impl ActivityTracker { influence: new_influence, beatmap: new_beatmap, } => { - let max_false = 2; + let max_false = 1; let mut current_false = 0; let matched = locked_queue.iter().any(|old_activity| { new_activity.user.id == old_activity.user.id @@ -270,7 +270,7 @@ impl ActivityTracker { } => { if new_influence.id != old_influence.id || new_beatmap.get_id() != old_beatmap.get_id() - && current_false < max_false + && current_false <= max_false { current_false += 1; false