mirror of https://github.com/vector-im/riot-web
re-apply Timer linting fixes that happened in the tiled ui PR
parent
8c30d05eb8
commit
a7d21ebb8e
|
@ -44,6 +44,7 @@ class UserActivity {
|
||||||
* Can be called multiple times with the same already running timer, which is a NO-OP.
|
* Can be called multiple times with the same already running timer, which is a NO-OP.
|
||||||
* Can be called before the user becomes active, in which case it is only started
|
* Can be called before the user becomes active, in which case it is only started
|
||||||
* later on when the user does become active.
|
* later on when the user does become active.
|
||||||
|
* @param {Timer} timer the timer to use
|
||||||
*/
|
*/
|
||||||
timeWhileActive(timer) {
|
timeWhileActive(timer) {
|
||||||
// important this happens first
|
// important this happens first
|
||||||
|
|
|
@ -70,6 +70,7 @@ export default class Timer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* if not started before, starts the timer.
|
* if not started before, starts the timer.
|
||||||
|
* @returns {Timer} the same timer
|
||||||
*/
|
*/
|
||||||
start() {
|
start() {
|
||||||
if (!this.isRunning()) {
|
if (!this.isRunning()) {
|
||||||
|
@ -81,6 +82,7 @@ export default class Timer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* (re)start the timer. If it's running, reset the timeout. If not, start it.
|
* (re)start the timer. If it's running, reset the timeout. If not, start it.
|
||||||
|
* @returns {Timer} the same timer
|
||||||
*/
|
*/
|
||||||
restart() {
|
restart() {
|
||||||
if (this.isRunning()) {
|
if (this.isRunning()) {
|
||||||
|
@ -98,6 +100,7 @@ export default class Timer {
|
||||||
/**
|
/**
|
||||||
* if the timer is running, abort it,
|
* if the timer is running, abort it,
|
||||||
* and reject the promise for this timer.
|
* and reject the promise for this timer.
|
||||||
|
* @returns {Timer} the same timer
|
||||||
*/
|
*/
|
||||||
abort() {
|
abort() {
|
||||||
if (this.isRunning()) {
|
if (this.isRunning()) {
|
||||||
|
|
Loading…
Reference in New Issue