This commit is contained in:
tiago.kayaya
2021-10-28 16:10:42 +01:00
parent aaab69f3af
commit f49d1f2842
4 changed files with 12 additions and 4 deletions
@@ -35,9 +35,9 @@
</ion-label> </ion-label>
</div> </div>
</div> </div>
<div *ngIf="room.customFields.countDownDate" class="d-flex align-items-center yellow-orange pl-10"> <div *ngIf="roomCountDownDate" class="d-flex align-items-center yellow-orange pl-10">
<i class="far fa-clock font-15"></i> <i class="far fa-clock font-15"></i>
<ion-label class="font-15 pl-10" color="warning">{{countDownDate(room.customFields.countDownDate, room._id)}}</ion-label> <ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
</div> </div>
</div> </div>
</ion-toolbar> </ion-toolbar>
@@ -56,6 +56,7 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
longPressActive = false; longPressActive = false;
showMessageOptions = false; showMessageOptions = false;
selectedMsgId:string; selectedMsgId:string;
roomCountDownDate:any;
@ViewChild('scrollMe') private myScrollContainer: ElementRef; @ViewChild('scrollMe') private myScrollContainer: ElementRef;
@@ -182,6 +183,9 @@ export class GroupMessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.chatService.getRoomInfo(this.roomId).subscribe(room=>{ this.chatService.getRoomInfo(this.roomId).subscribe(room=>{
this.room = room['room']; this.room = room['room'];
this.roomName = this.room.name.split('-').join(' '); this.roomName = this.room.name.split('-').join(' ');
if(this.room.customFields.countDownDate){
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
}
this.getGroupContacts(this.room); this.getGroupContacts(this.room);
this.loadGroupMessages(this.room); this.loadGroupMessages(this.room);
this.showLoader = false; this.showLoader = false;
@@ -23,9 +23,9 @@
</ion-label> </ion-label>
</div> </div>
</div> </div>
<div *ngIf="room.customFields.countDownDate" class="d-flex align-items-center yellow-orange pl-10"> <div *ngIf="roomCountDownDate" class="d-flex align-items-center yellow-orange pl-10">
<i class="far fa-clock font-15" ></i> <i class="far fa-clock font-15" ></i>
<ion-label class="font-15 pl-10" color="warning">{{countDownDate(room.customFields.countDownDate, room._id)}}</ion-label> <ion-label class="font-15 pl-10" color="warning">{{roomCountDownDate}}</ion-label>
</div> </div>
</div> </div>
</ion-toolbar> </ion-toolbar>
@@ -56,6 +56,7 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
currentPosition: any; currentPosition: any;
startPosition: number; startPosition: number;
scrollToBottomBtn = false; scrollToBottomBtn = false;
roomCountDownDate:any;
@Input() roomId:string; @Input() roomId:string;
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>(); @Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
@@ -251,6 +252,9 @@ export class GroupMessagesPage implements OnInit, OnChanges, AfterViewInit, OnDe
if(this.room.name){ if(this.room.name){
this.roomName = this.room.name.split('-').join(' '); this.roomName = this.room.name.split('-').join(' ');
} }
if(this.room.customFields.countDownDate){
this.roomCountDownDate = this.timeService.countDownDate(this.room.customFields.countDownDate, this.room._id);
}
this.getGroupContacts(this.room); this.getGroupContacts(this.room);
//this.loadGroupMessages(this.room); //this.loadGroupMessages(this.room);
this.showLoader = false; this.showLoader = false;