Skip to content

Commit

Permalink
fix: update last_activity only if an actual update occurred
Browse files Browse the repository at this point in the history
  • Loading branch information
vyfor committed Dec 6, 2024
1 parent cb81ac9 commit 1dd0e20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/messages/events/client/update_activity.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::sync::atomic::Ordering;

use crate::json::Json;
use crate::messages::events::event::{EventContext, OnEvent};
use crate::presence::activity::ActivityContext;
use crate::presence::types::Packet;
Expand Down Expand Up @@ -28,9 +29,8 @@ impl OnEvent for UpdateActivityEvent {
ctx.cord
.rich_client
.update(&Packet::new(ctx.cord.rich_client.pid, Some(&activity)))?;
session.last_activity = Some(activity);
}

session.last_activity = Some(activity);
}
}

Expand Down

0 comments on commit 1dd0e20

Please sign in to comment.