MOBILE-2962 user: Display online status for current user

main
Dani Palou 2019-04-10 13:26:09 +02:00
parent bbfe831846
commit 94c1f4fd0d
1 changed files with 1 additions and 5 deletions

View File

@ -44,7 +44,6 @@ export class CoreUserAvatarComponent implements OnInit, OnChanges, OnDestroy {
// Variable to check if we consider this user online or not.
// @TODO: Use setting when available (see MDL-63972) so we can use site setting.
protected timetoshowusers = 300000; // Miliseconds default.
protected myUser = false;
protected currentUserId: number;
protected pictureObs;
@ -91,9 +90,6 @@ export class CoreUserAvatarComponent implements OnInit, OnChanges, OnDestroy {
this.userId = this.userId || (this.user && (this.user.userid || this.user.id));
this.courseId = this.courseId || (this.user && this.user.courseid);
// If not available we cannot ensure the avatar is from the current user.
this.myUser = this.userId && this.userId == this.currentUserId;
}
/**
@ -102,7 +98,7 @@ export class CoreUserAvatarComponent implements OnInit, OnChanges, OnDestroy {
* @return boolean
*/
isOnline(): boolean {
if (this.myUser || this.utils.isFalseOrZero(this.user.isonline)) {
if (this.utils.isFalseOrZero(this.user.isonline)) {
return false;
}