RichPresence: Use class for activity

This commit is contained in:
Jonas Kvinge
2025-04-08 20:52:34 +02:00
parent ae9584c213
commit a9f2c384fa
2 changed files with 5 additions and 3 deletions

View File

@@ -49,7 +49,6 @@ RichPresence::RichPresence(const SharedPtr<Player> player,
: QObject(parent),
player_(player),
playlist_manager_(playlist_manager),
activity_({ {}, {}, {}, 0, 0, 0 }),
send_presence_timestamp_(0),
enabled_(false) {

View File

@@ -58,14 +58,17 @@ class RichPresence : public QObject {
const SharedPtr<Player> player_;
const SharedPtr<PlaylistManager> playlist_manager_;
struct {
class Activity {
public:
explicit Activity() : start_timestamp(0), length_secs(0), seek_secs(0) {}
QString title;
QString artist;
QString album;
qint64 start_timestamp;
qint64 length_secs;
qint64 seek_secs;
} activity_;
};
Activity activity_;
qint64 send_presence_timestamp_;
bool enabled_;
};