RichPresence: Remove rate limit

This commit is contained in:
Jonas Kvinge
2025-04-13 12:01:56 +02:00
parent c083110051
commit ff032c3cd7
2 changed files with 0 additions and 10 deletions

View File

@@ -49,7 +49,6 @@ RichPresence::RichPresence(const SharedPtr<Player> player,
: QObject(parent),
player_(player),
playlist_manager_(playlist_manager),
send_presence_timestamp_(0),
enabled_(false) {
Discord_Initialize(kDiscordApplicationId, nullptr, 1);
@@ -111,14 +110,6 @@ void RichPresence::SendPresenceUpdate() {
return;
}
const qint64 current_timestamp = QDateTime::currentMSecsSinceEpoch();
if (current_timestamp - send_presence_timestamp_ < kDiscordPresenceUpdateRateLimitMs) {
qLog(Info) << "Not sending rich presence due to rate limit of" << kDiscordPresenceUpdateRateLimitMs << "ms";
return;
}
send_presence_timestamp_ = current_timestamp;
::DiscordRichPresence presence_data{};
memset(&presence_data, 0, sizeof(presence_data));
presence_data.type = 2; // Listening

View File

@@ -69,7 +69,6 @@ class RichPresence : public QObject {
qint64 seek_secs;
};
Activity activity_;
qint64 send_presence_timestamp_;
bool enabled_;
};