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
+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);