This commit is contained in:
tiago.kayaya
2021-06-17 16:43:18 +01:00
parent 0c32592894
commit eb0715f402
6 changed files with 59 additions and 3 deletions
+1 -1
View File
@@ -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>
+19
View File
@@ -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);