Skip to content

Commit

Permalink
feat: updated activity logic to prevent multiple beatmap edits to sho…
Browse files Browse the repository at this point in the history
…w up
  • Loading branch information
112batuhan committed Dec 8, 2024
1 parent f6d6c2b commit 92d3f5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/handlers/activity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 92d3f5c

Please sign in to comment.