Remove relevant console log,

This commit is contained in:
Eudes Inácio
2022-04-28 09:32:27 +01:00
parent 3021e8b0e1
commit 2826cea9df
153 changed files with 1001 additions and 1132 deletions
+39 -39
View File
@@ -137,7 +137,7 @@ export class ChatPage implements OnInit {
this.authService.userData$.subscribe((res: any) => {
this.loggedUser = res;
console.log(this.loggedUser);
});
this.hideRefreshButton();
@@ -168,7 +168,7 @@ export class ChatPage implements OnInit {
ngOnDestroy() {
this.setStatus('offline');
this.dataService.set("newGroup", false);
console.log('On Destroy')
}
setStatus(status: string) {
@@ -177,7 +177,7 @@ export class ChatPage implements OnInit {
status: status,
}
this.chatService.setUserStatus(body).subscribe(res => {
console.log(res);
})
}
@@ -210,7 +210,7 @@ export class ChatPage implements OnInit {
this.showGroupContacts = false;
this.showNewEvent = false;
this.showAttendees = false;
console.log('All components closed!');
}
showEmptyContainer() {
@@ -241,7 +241,7 @@ export class ChatPage implements OnInit {
}
}
openContactsPage() {
console.log('OK');
this.idSelected = '';
this.closeAllDesktopComponents();
@@ -249,7 +249,7 @@ export class ChatPage implements OnInit {
this.selectContact();
}
else {
console.log('here');
this.showContacts = true;
}
}
@@ -283,7 +283,7 @@ export class ChatPage implements OnInit {
this.closeAllDesktopComponents();
this.showEmptyComponent = false;
this.roomId = rid;
console.log(this.roomId);
this.showGroupMessages = true;
}
}
@@ -299,7 +299,7 @@ export class ChatPage implements OnInit {
this.groupRoomId = data.roomId;
this.closeAllDesktopComponents();
if (window.innerWidth < 701) {
console.log('Mobile');
}
else {
this.showNewEvent = true;
@@ -355,7 +355,7 @@ export class ChatPage implements OnInit {
let params = new HttpParams();
params = params.set("types", "c");
this.chatService.customsRooms(params).subscribe(res => {
//console.log(res);
//
});
}
@@ -369,9 +369,9 @@ export class ChatPage implements OnInit {
var dateB = new Date(b._updatedAt).getTime();
return dateB - dateA;
});
//console.log('DIRECTMESSAGE FROM DB', this.userDirectMessages);
//
//console.log('ROOMS FROM DB', rooms)
//
})
this.storageservice.get('chatusers').then((users) => {
@@ -379,7 +379,7 @@ export class ChatPage implements OnInit {
})
} else {
this.sqlservice.getAllChatRoom().then((rooms: any) => {
//console.log('ROOMS FROM DB', rooms)
//
let roomsArray = [];
rooms.forEach(element => {
let roomListDB = {
@@ -399,16 +399,16 @@ export class ChatPage implements OnInit {
var dateB = new Date(b._updatedAt).getTime();
return dateB - dateA;
});
//console.log('DIRECTMESSAGE FROM DB', this.userDirectMessages);
//
//console.log('ROOMS FROM DB', rooms)
//
})
this.sqlservice.getAllChatUsers().then((userslist: any) => {
//console.log('USERS FOM DB 1', userslist)
//
let chatusersArray = [];
userslist.forEach(element => {
console.log('USERS FOM DB 2', element)
let userListDB = {
_id: element.Id,
name: element.Name,
@@ -436,7 +436,7 @@ export class ChatPage implements OnInit {
_updatedAt: element._updatedAt
}
//console.log(' Web TRANSFORM ROOM LIST', roomList)
//
roomsArray.push(roomList)
});
@@ -453,7 +453,7 @@ export class ChatPage implements OnInit {
updatedat: element._updatedAt
}
//console.log('TRANSFORM ROOM LIST', roomList)
//
this.sqlservice.addChatListRoom(roomList);
});
}
@@ -463,26 +463,26 @@ export class ChatPage implements OnInit {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
let usersArray = [];
users.forEach(element => {
//console.log('TRANSFORM USER CHAT 1', element)
//
let chatusers = {
_id: element._id,
name: element.name,
username: element.username
}
//console.log('TRANSFORM USER CHAT 2', chatusers)
//
usersArray.push(chatusers);
});
await this.storageservice.remove('chatusers');
await this.storageservice.store('chatusers',usersArray);
} else {
users.forEach(element => {
//console.log('TRANSFORM USER CHAT 1', element)
//
let chatusers = {
id: element._id,
name: element.name,
username: element.username
}
//console.log('TRANSFORM USER CHAT 2', chatusers)
//
this.sqlservice.addChatListUsers(chatusers);
});
}
@@ -499,12 +499,12 @@ export class ChatPage implements OnInit {
async getChatMembers() {
//return await this.chatService.getMembers(roomId).toPromise();
this.chatService.getAllUsers().subscribe(res => {
//console.log('chatusers', res);
//
this.transformDataUserList(res['users'])
/* if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.dmUsers = res['users'].filter(data => data.username != this.loggedUserChat.me.username);
//console.log(this.dmUsers);
//
}*/
});
@@ -520,7 +520,7 @@ export class ChatPage implements OnInit {
return dateB - dateA;
});
console.log('GROUPS FROM DB', k)
this.allGroups = rooms.sort((a, b) => {
@@ -530,7 +530,7 @@ export class ChatPage implements OnInit {
});
//console.log('GROUPS FROM DB', this.allGroups)
//
})
this.storageservice.get('chatusers').then((users) => {
@@ -559,15 +559,15 @@ export class ChatPage implements OnInit {
var dateB = new Date(b._updatedAt).getTime();
return dateB - dateA;
});
//console.log('Group FROM DB', this.allGroups);
//
})
/* this.sqlservice.getAllChatUsers().then((userslist: any) => {
console.log('USERS FOM DB 1', userslist)
let chatusersArray = [];
userslist.forEach(element => {
console.log('USERS FOM DB 2', element)
let userListDB = {
_id: element.Id,
name: element.Name,
@@ -598,7 +598,7 @@ export class ChatPage implements OnInit {
_updatedAt: element._updatedAt
}
console.log(' Web TRANSFORM ROOM LIST', roomList)
groupsArray.push(roomList)
});
@@ -617,7 +617,7 @@ export class ChatPage implements OnInit {
updatedat: element._updatedAt
}
console.log('TRANSFORM ROOM LIST', roomList)
this.sqlservice.addChatListRoom(roomList);
});
}
@@ -626,7 +626,7 @@ export class ChatPage implements OnInit {
async getGroups(event?) {
this.result = this.chatService.getAllPrivateGroups().subscribe(async (res: any) => {
//console.log(res);
//
this.showLoader = false;
if (res.groups != 200) {
@@ -634,7 +634,7 @@ export class ChatPage implements OnInit {
this.getGroupsDB();
this.privateGroups = res.groups;
console.log('Chat list group' , res);
/* this.result = this.chatService.getAllUserChannels().subscribe((res:any)=>{
this.publicGroups = res.channels; */
//let all = this.privateGroups.concat(this.publicGroups);
@@ -643,10 +643,10 @@ export class ChatPage implements OnInit {
var dateB = new Date(b._updatedAt).getTime();
return dateB - dateA;
}); */
//console.log(this.allGroups);
//
/* }); */
if (this.route.url != "/home/chat") {
//console.log("Timer message stop")
//
}
else {
//Check if modal is opened
@@ -699,7 +699,7 @@ export class ChatPage implements OnInit {
});
await modal.present();
modal.onDidDismiss().then((res) => {
console.log(res.data);
this.modalController.dismiss(res.data);
});
}
@@ -707,7 +707,7 @@ export class ChatPage implements OnInit {
async openMessagesModal(roomId: any) {
this.closeAllDesktopComponents();
//console.log(roomId);
//
const modal = await this.modalController.create({
component: MessagesPage,
@@ -722,7 +722,7 @@ export class ChatPage implements OnInit {
async openGroupMessagesModal(roomId: any) {
console.log(roomId);
const modal = await this.modalController.create({
component: GroupMessagesPage,
@@ -737,7 +737,7 @@ export class ChatPage implements OnInit {
// this.crop.crop('path/to/image.jpg', {quality: 75})
// .then(
// newImage => console.log('new image path is: ' + newImage),
// newImage =>
// error => console.error('Error cropping image', error)
// );