Add smoothness, add highlighting of a way

This commit is contained in:
Pieter Vander Vennet 2020-07-30 16:34:06 +02:00
parent 8af25a9cdf
commit afaaaaadb1
12 changed files with 146 additions and 12 deletions

View file

@ -91,6 +91,8 @@ export class OsmConnection {
}
self.UpdatePreferences();
self.CheckForMessagesContinuously();
// details is an XML DOM of user details
let userInfo = details.getElementsByTagName("user")[0];
@ -120,9 +122,21 @@ export class OsmConnection {
data.unreadMessages = parseInt(messages.getAttribute("unread"));
data.totalMessages = parseInt(messages.getAttribute("count"));
self.userDetails.ping();
});
}
private CheckForMessagesContinuously() {
const self = this;
window.setTimeout(() => {
if (self.userDetails.data.loggedIn) {
console.log("Checking for messages")
this.AttemptLogin();
}
}, 5 * 60 * 1000);
}
/**
* All elements with class 'activate-osm-authentication' are loaded and get an 'onclick' to authenticate
*/