aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/accounts-service-user.vala12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/accounts-service-user.vala b/src/accounts-service-user.vala
index 2062dc8..47189a5 100644
--- a/src/accounts-service-user.vala
+++ b/src/accounts-service-user.vala
@@ -35,6 +35,7 @@ public class AccountsServiceUser : Object {
Act.UserManager accounts_manager = Act.UserManager.get_default();
Act.User? user = null;
AccountsServiceSoundSettings? proxy = null;
+ uint timer = 0;
MediaPlayer? _player = null;
public MediaPlayer? player {
@@ -45,6 +46,12 @@ public class AccountsServiceUser : Object {
if (this.proxy == null)
return;
+ /* Always reset the timer */
+ if (this.timer != 0) {
+ GLib.Source.remove(this.timer);
+ this.timer = 0;
+ }
+
if (this._player == null) {
/* Clear it */
this.proxy.player_name = "";
@@ -73,6 +80,11 @@ public class AccountsServiceUser : Object {
this.proxy.album = "";
this.proxy.art_url = "";
}
+
+ this.timer = GLib.Timeout.add_seconds(5 * 60, () => {
+ this.proxy.timestamp = GLib.get_monotonic_time();
+ return true;
+ });
}
}
get {