forked from CIT/Vmeda.Online
		
	MOBILE-2962 user: Display online status for current user
This commit is contained in:
		
							parent
							
								
									bbfe831846
								
							
						
					
					
						commit
						94c1f4fd0d
					
				| @ -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; | ||||
|         } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user