mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
improve search loader and chat user flow
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " slot="end" src='assets/images/theme/gov/icons-calendar-arrow-left.svg'></ion-icon>
|
||||
</div>
|
||||
<div class="div-title">
|
||||
<ion-label class="title">Nova Conversa</ion-label>
|
||||
<!-- Desktop -->
|
||||
<ion-label class="title">Nova Conversas</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,8 @@ export class ContactsPage implements OnInit {
|
||||
|
||||
@Output() openMessage:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() emptyTextDescriptionOpen:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() backToChat:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() backToChat:EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() closeAllDesktopComponents:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
private modalController: ModalController,
|
||||
@@ -86,7 +87,12 @@ export class ContactsPage implements OnInit {
|
||||
}
|
||||
|
||||
close() {
|
||||
this.backToChat.emit({roomId: this.roomId});
|
||||
if(this.roomId) {
|
||||
this.backToChat.emit({roomId: this.roomId});
|
||||
} else {
|
||||
this.closeAllDesktopComponents.emit();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
clicked() {
|
||||
|
||||
@@ -82,7 +82,12 @@ export class NewGroupPage implements OnInit{
|
||||
this.RouteService.goBack();
|
||||
this.dataService.set("link", false);
|
||||
} else {
|
||||
this.backToChat.emit({roomId: this.roomId});
|
||||
if(this.roomId) {
|
||||
this.backToChat.emit({roomId: this.roomId});
|
||||
} else {
|
||||
this.closeAllDesktopComponents.emit();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,14 @@ export class HeaderPage implements OnInit {
|
||||
}
|
||||
|
||||
async dynamicSearch() {
|
||||
window['dynamicSearch'](this.searchSubject)
|
||||
|
||||
if(window['dynamicSearch']) {
|
||||
window['dynamicSearch']()
|
||||
} else {
|
||||
setTimeout(()=>{
|
||||
this.dynamicSearch()
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -213,16 +220,15 @@ export class HeaderPage implements OnInit {
|
||||
}
|
||||
|
||||
async basicSearch() {
|
||||
window['searchTriger']()
|
||||
|
||||
if(window['searchTriger']) {
|
||||
window['searchTriger']()
|
||||
} else {
|
||||
setTimeout(()=>{
|
||||
this.basicSearch()
|
||||
}, 100)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
profileLabel(text) {
|
||||
if (text == 'MDGPR') {
|
||||
return 'MD'
|
||||
} else if (text == 'PR') {
|
||||
return text
|
||||
} else {
|
||||
return 'UN'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user