mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
<button class="btn-no-color" (click)="openNewGroupPage()">
|
||||
<ion-icon slot="end" src="assets/images/icons-chat-new-group.svg" ></ion-icon>
|
||||
</button>
|
||||
<button class="btn-no-color" (click)="doRefresh()">
|
||||
<button *ngIf="hideRefreshBtn" class="btn-no-color" (click)="doRefresh()">
|
||||
<ion-icon class="title-icon" name="reload-circle"></ion-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -91,6 +91,7 @@ export class ChatPage implements OnInit {
|
||||
|
||||
/* Fim websockets variables*/
|
||||
loggedUserChat:any;
|
||||
hideRefreshBtn = true;
|
||||
|
||||
constructor(
|
||||
private http:HttpClient,
|
||||
@@ -120,7 +121,25 @@ export class ChatPage implements OnInit {
|
||||
//this.sendMsg();
|
||||
|
||||
/* Fim websocket functions */
|
||||
this.hideRefreshButton();
|
||||
}
|
||||
|
||||
hideRefreshButton(){
|
||||
window.onresize = (event) => {
|
||||
if( window.innerWidth < 801) {
|
||||
this.hideRefreshBtn = false;
|
||||
}
|
||||
else{
|
||||
this.hideRefreshBtn = true;
|
||||
}
|
||||
}
|
||||
if(window.innerWidth < 801){
|
||||
console.log('YASS');
|
||||
this.hideRefreshBtn = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
loadMessage(){
|
||||
this.chatService.messages.subscribe(msg => {
|
||||
console.log("Response from websocket: " + msg);
|
||||
|
||||
Reference in New Issue
Block a user