performace

This commit is contained in:
Peter Maquiran
2023-09-29 16:40:50 +01:00
parent 7f1dbf13aa
commit 93ad41eab9
12 changed files with 175 additions and 106 deletions
+11 -15
View File
@@ -71,7 +71,7 @@
"@ionic-native/local-notifications": "^4.20.0",
"@ionic-native/media": "^5.36.0",
"@ionic-native/media-capture": "^5.36.0",
"@ionic-native/network": "^5.22.0-beta-1",
"@ionic-native/network": "^5.36.0",
"@ionic-native/photo-viewer": "^5.36.0",
"@ionic-native/screen-orientation": "^5.35.0",
"@ionic-native/social-sharing": "^5.36.0",
@@ -135,7 +135,6 @@
"howler": "^2.2.3",
"http-server": "^14.1.1",
"husky": "^8.0.2",
"i": "^0.3.7",
"ionic-angular": "^3.9.10",
"ionic-image-loader": "^6.3.3",
"ionic-image-loader-v5": "^1.0.2",
@@ -4692,8 +4691,9 @@
}
},
"node_modules/@ionic-native/network": {
"version": "5.22.0-beta-1",
"license": "MIT",
"version": "5.36.0",
"resolved": "https://registry.npmjs.org/@ionic-native/network/-/network-5.36.0.tgz",
"integrity": "sha512-gpa7cJqodEK+zmmViYJCqEpXoKSXcaYLaaRKdv5gn5M++bpmiw2pKM9JH8VoqYWaYDcUwD3S0yYeBBkG5DE0Kg==",
"dependencies": {
"@types/cordova": "latest"
},
@@ -11990,8 +11990,9 @@
},
"node_modules/cordova-plugin-network-information": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-network-information/-/cordova-plugin-network-information-3.0.0.tgz",
"integrity": "sha512-bBtP3PxIX8vshsfR0+F6co2e2cFLgjt18yKIdigzMwk6ANudWQ72RB3g2qMPyT6fBDWmUyE1Qd+bKQB/fZtQwQ==",
"dev": true,
"license": "Apache-2.0",
"engines": {
"cordovaDependencies": {
"3.0.0": {
@@ -16325,12 +16326,6 @@
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/i": {
"version": "0.3.7",
"engines": {
"node": ">=0.4"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"license": "MIT",
@@ -43726,7 +43721,9 @@
}
},
"@ionic-native/network": {
"version": "5.22.0-beta-1",
"version": "5.36.0",
"resolved": "https://registry.npmjs.org/@ionic-native/network/-/network-5.36.0.tgz",
"integrity": "sha512-gpa7cJqodEK+zmmViYJCqEpXoKSXcaYLaaRKdv5gn5M++bpmiw2pKM9JH8VoqYWaYDcUwD3S0yYeBBkG5DE0Kg==",
"requires": {
"@types/cordova": "latest"
}
@@ -48906,6 +48903,8 @@
},
"cordova-plugin-network-information": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-network-information/-/cordova-plugin-network-information-3.0.0.tgz",
"integrity": "sha512-bBtP3PxIX8vshsfR0+F6co2e2cFLgjt18yKIdigzMwk6ANudWQ72RB3g2qMPyT6fBDWmUyE1Qd+bKQB/fZtQwQ==",
"dev": true
},
"cordova-plugin-okhttp": {
@@ -51796,9 +51795,6 @@
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz",
"integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg=="
},
"i": {
"version": "0.3.7"
},
"iconv-lite": {
"version": "0.6.3",
"requires": {
+1 -2
View File
@@ -85,7 +85,7 @@
"@ionic-native/local-notifications": "^4.20.0",
"@ionic-native/media": "^5.36.0",
"@ionic-native/media-capture": "^5.36.0",
"@ionic-native/network": "^5.22.0-beta-1",
"@ionic-native/network": "^5.36.0",
"@ionic-native/photo-viewer": "^5.36.0",
"@ionic-native/screen-orientation": "^5.35.0",
"@ionic-native/social-sharing": "^5.36.0",
@@ -149,7 +149,6 @@
"howler": "^2.2.3",
"http-server": "^14.1.1",
"husky": "^8.0.2",
"i": "^0.3.7",
"ionic-angular": "^3.9.10",
"ionic-image-loader": "^6.3.3",
"ionic-image-loader-v5": "^1.0.2",
@@ -58,8 +58,8 @@
<span class="time">{{msg.time}}</span>
</div>
<div class="message">
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}} </pre>
<pre *ngIf="msg.delate == true" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}} </pre>
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre>
<pre *ngIf="msg.delate == true" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
@@ -11,7 +11,7 @@
<div class="middle-container" *ngIf="!showMessageOptions">
<div class="middle">
<ion-label class="title">{{ChatSystemService.getDmRoom(roomId).name}}</ion-label>
<span><ion-icon class="{{ ChatSystemService.getDmRoom(this.roomId).online }}" name="ellipse"></ion-icon></span>
<span><ion-icon *ngIf="RochetChatConnectorService.isLogin" class="{{ ChatSystemService.getDmRoom(this.roomId).online }}" name="ellipse"></ion-icon></span>
</div>
</div>
@@ -58,7 +58,7 @@
<div>
<div class="file">
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}} </pre>
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre>
<!-- <ion-label *ngIf="msg.delate == false" class="message-box">{{msg.msg}} </ion-label> -->
<ion-label *ngIf="msg.delate == true" class="flex-0">Apagou a mensagem</ion-label>
+24 -23
View File
@@ -32,7 +32,7 @@ import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
import { Filesystem, Directory } from '@capacitor/filesystem';
import { NewEventPage } from '../../agenda/new-event/new-event.page';
import { NotificationsService } from 'src/app/services/notifications.service';
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service'
const IMAGE_DIR = 'stored-images';
@@ -115,7 +115,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
// private document: DocumentViewer
private file: File,
private fileOpener: FileOpener,
private router: Router
private router: Router,
public RochetChatConnectorService: RochetChatConnectorService,
) {
this.loggedUser = SessionStore.user.ChatData['data'];
this.roomId = this.navParams.get('roomId');
@@ -140,7 +141,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
ngOnInit() {
console.log(this.router.url);
console.log(this.router.url);
this.createDirectoryImage()
// this.chatService.refreshtoken();
this.ChatSystemService.getUserOfRoom(this.roomId).then((value) => {
@@ -151,7 +152,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
this.getChatMembers();
}
ngAfterViewInit() {
this.scrollChangeCallback = () => this.onContentScrolled(event);
@@ -324,7 +325,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
}
async goToEvent(event: any) {
let classs;
if (window.innerWidth < 701) {
classs = 'modal modal-desktop'
@@ -384,7 +385,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} else if (msg.u.username == this.members[0].username) {
this.notificationService.ChatSendMessageNotification(this.members[1].username,this.members[1].name,lastMsg.msg,this.roomId)
}
})
} */
@@ -593,7 +594,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
cssClass: 'modal modal-desktop',
backdropDismiss: false
});
modal.onDidDismiss().then((data) => {
if (data?.data && data.data.id) {
@@ -631,7 +632,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
});
var imageBase64 = 'data:image/jpeg;base64,' + file.base64String
const compressedImage = await this.compressImageBase64(
imageBase64,
@@ -671,25 +672,25 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
// convert base64 to raw binary data held in a string
// doesn't handle URLEncoded DataURIs - see SO answer #6850276 for code that does this
var byteString = atob(dataURI.split(',')[1]);
// separate out the mime component
var mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]
// write the bytes of the string to an ArrayBuffer
var ab = new ArrayBuffer(byteString.length);
// create a view into the buffer
var ia = new Uint8Array(ab);
// set the bytes of the buffer to the correct values
for (var i = 0; i < byteString.length; i++) {
ia[i] = byteString.charCodeAt(i);
}
// write the ArrayBuffer to a blob, and you're done
var blob = new Blob([ab], {type: mimeString});
return blob;
}
async addImageMobile() {
@@ -761,7 +762,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
//
var imageBase64 = 'data:image/jpeg;base64,' + file.base64String
const compressedImage = await this.compressImageBase64(
imageBase64,
@@ -1054,7 +1055,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
} else {
pathFile = this.file.externalRootDirectory
}
console.log(pathFile)
await Filesystem.writeFile({
@@ -1192,32 +1193,32 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
return new Promise((resolve, reject) => {
const image = new (window as any).Image();
image.src = base64String;
image.onload = async () => {
const canvas = document.createElement('canvas');
let newWidth = image.width;
let newHeight = image.height;
if (newWidth > maxWidth) {
newHeight *= maxWidth / newWidth;
newWidth = maxWidth;
}
if (newHeight > maxHeight) {
newWidth *= maxHeight / newHeight;
newHeight = maxHeight;
}
canvas.width = newWidth;
canvas.height = newHeight;
const context = canvas.getContext('2d');
context?.drawImage(image, 0, 0, newWidth, newHeight);
const compressedBase64 = canvas.toDataURL('image/jpeg', quality);
resolve(compressedBase64);
};
image.onerror = (error) => {
reject(error);
};
+15 -13
View File
@@ -33,7 +33,7 @@ export class AuthService {
opts:any;
tabIsActive = true
constructor(
private http: HttpClient,
private storageService:StorageService,
@@ -62,7 +62,7 @@ export class AuthService {
if(!this.tabIsActive) {
this.tabIsActive = true
const data = SessionStore.getDataFromLocalStorage();
if(!data?.user?.Authorization && SessionStore?.user?.Authorization) {
window.location.reload();
}
@@ -72,7 +72,7 @@ export class AuthService {
}
}
});
window.addEventListener('blur', (event) => {
this.tabIsActive = false
});
@@ -91,7 +91,7 @@ export class AuthService {
try {
response = await this.http.post<LoginUserRespose>(environment.apiURL + "UserAuthentication/Login", '', this.opts).toPromise();
if(saveSession) {
this.SetSession(response, user)
@@ -152,7 +152,7 @@ export class AuthService {
}else {
session.Profile = 'Unknown'
}
session.Password = user.password
session.BasicAuthKey = user.BasicAuthKey
SessionStore.reset(session)
@@ -165,11 +165,11 @@ export class AuthService {
loginToChatWs() {
setTimeout(() => {
if(SessionStore.user.ChatData?.data) {
this.RochetChatConnectorService.connect();
this.RochetChatConnectorService.login().then((message: any) => {
SessionStore.user.RochetChatUserId = message.result.id
SessionStore.save()
@@ -179,13 +179,13 @@ export class AuthService {
this.ChatSystemService.getAllRooms();
this.RochetChatConnectorService.setStatus('online')
}, 200);
}).catch((error) => {
// console.error(SessionStore.user.ChatData, 'web socket login',error)
})
}
// before sending a message with a attachment
@@ -200,6 +200,7 @@ export class AuthService {
message.file.guid = guid.path
message.downloadFileMsg()
message.uploadingFile = false
return true
} catch(e) {
@@ -219,10 +220,11 @@ export class AuthService {
message.attachments[0].title_link = url_no_options
message.attachments[0].message_link = url_no_options
return true
message.uploadingFile = false
return true
} catch(e) {
window['e'] = e
window['e'] = e
console.error('BeforesendAtachment', e)
message.uploadingFile = false
return false
@@ -235,7 +237,7 @@ export class AuthService {
this.NfService.downloadFileMsg = async (message: MessageService, room?: RoomService) => {
//
//
let downloadFile = "";
if (message.file.type == "application/img") {
const event: any = await this.AttachmentsService.downloadFile(message.file.guid).toPromise();
@@ -279,7 +281,7 @@ export class AuthService {
logoutChat() {
}
async presentAlert(message: string) {
const alert = await this.alertController.create({
cssClass: 'my-custom-class',
+29 -25
View File
@@ -206,19 +206,15 @@ export class ChatSystemService {
async restoreRooms() {
try {
const rooms = await this.storage.get('Rooms');
const _rooms = await this.storage.get('Rooms');
if(rooms) {
for (let roomData of rooms.result.update) {
if(_rooms) {
for (let roomData of this.sortArrayISODate(_rooms)) {
await this.prepareRoom(roomData);
}
}
} catch(e){}
setTimeout(() => {
this.sortRoomList()
}, 10000)
}
async restoreUsers () {
@@ -230,6 +226,14 @@ export class ChatSystemService {
}
}
sortArrayISODate(messages: any): any[] {
return messages.sort((a,b) =>
new Date(b._updatedAt ).getTime()
-
new Date(a._updatedAt).getTime())
}
async getAllRooms (callback:Function = () =>{} , roomIdCallback = "") {
this.loadingWholeList = true
var rooms;
@@ -248,8 +252,17 @@ export class ChatSystemService {
let index = 0
if(rooms?.result?.update) {
for (let roomData of rooms.result.update) {
let _rooms = rooms?.result?.update
if(_rooms) {
_rooms = _rooms.map( e => {
e["_updatedAt"] = e._updatedAt || e._updatedAt['$date']
return e
})
for (let roomData of this.sortArrayISODate(_rooms) ) {
const roomId = this.getRoomId(roomData);
@@ -272,8 +285,8 @@ export class ChatSystemService {
const members = res['members'];
const users = members.filter(data => data.username != this.sessionStore.user.UserName);
rooms.result.update[index]['members'] = members
rooms.result.update[index]['membersExcludeMe'] = users
_rooms[index]['members'] = members
_rooms[index]['membersExcludeMe'] = users
await this.prepareRoom(roomData);
} else {
@@ -295,8 +308,8 @@ export class ChatSystemService {
const members = res['members'];
const users = members.filter(data => data.username != this.sessionStore.user.UserName);
rooms.result.update[index]['members'] = members
rooms.result.update[index]['membersExcludeMe'] = users
_rooms[index]['members'] = members
_rooms[index]['membersExcludeMe'] = users
await this.prepareRoom(roomData);
@@ -322,8 +335,8 @@ export class ChatSystemService {
const members = res['members'];
const users = members.filter(data => data.username != this.sessionStore.user.UserName);
rooms.result.update[index]['members'] = members
rooms.result.update[index]['membersExcludeMe'] = users
_rooms[index]['members'] = members
_rooms[index]['membersExcludeMe'] = users
await this.prepareRoom(roomData);
}
@@ -339,17 +352,8 @@ export class ChatSystemService {
}
this.loadingWholeList = false
await this.storage.set('Rooms', rooms);
this.sortRoomList()
setTimeout(() => {
this.sortRoomList()
}, 1000)
setTimeout(() => {
this.sortRoomList()
}, 10000)
await this.storage.set('Rooms', _rooms);
this.onRoomsLoad.executor()
}
+28 -13
View File
@@ -220,6 +220,7 @@ export class MessageService {
this.RochetChatConnectorService.registerCallback({
type: 'reConnect',
funx: async () => {
console.log('send now have login')
this.send().catch((error) =>{
console.error(error)
})
@@ -227,7 +228,16 @@ export class MessageService {
}
})
console.log('no login')
} else if (this.UploadAttachmentsTemp <= 3) {
console.log('temp'+ this.UploadAttachmentsTemp)
setTimeout(async () => {
return await this.send()
}, 4000)
} else if(this.NetworkServiceService.getCurrentNetworkStatus() == ConnectionStatus.Offline) {
console.log('recooonect')
this.RochetChatConnectorService.registerCallback({
type: 'reConnect',
funx: async ()=> {
@@ -238,11 +248,8 @@ export class MessageService {
return true
}
})
} else if (this.UploadAttachmentsTemp <= 3) {
setTimeout(async () => {
return await this.send()
}, 3000)
} else if (this.NetworkServiceService.getCurrentNetworkStatus() == ConnectionStatus.Online) {
console.log('manual')
this.manualRetry = true
}
@@ -256,6 +263,7 @@ export class MessageService {
async sendRequestAttachment() {
console.log('sendRequestAttachment')
this.uploadingFile = true
let uploadSuccessfully = false
@@ -270,23 +278,30 @@ export class MessageService {
await this.generateTemporaryData()
}
console.log('send temp')
if(this.hasSendAttachment == false) {
try {
uploadSuccessfully = await this.NfService.beforeSendAttachment(this)
this.UploadAttachmentsTemp++
this.uploadingFile = false
this.manualRetry = false
this.errorUploadingAttachment = false
this.hasSendAttachment = true
this.UploadAttachmentsTemp++
uploadSuccessfully = await this.NfService.beforeSendAttachment(this)
this.uploadingFile = false
this.hasSendAttachment = uploadSuccessfully
if(this.hasSendAttachment) {
console.log('send uploadSuccessfully')
} else {
console.log('not send uploadSuccessfully')
}
this.saveChanges()
} catch (error) {
this.uploadingFile = false
console.log('send not uploadSuccessfully')
this.errorUploadingAttachment = true
this.UploadAttachmentsTemp++
this.saveChanges()
}
@@ -409,14 +424,14 @@ export class MessageService {
if(!roomObject.isGroup) {
var memeberTosend = this.ChatSystemService.getRoomById(this.rid).membersExcludeMe
this.notificationService.ChatSendMessageNotification(memeberTosend[0].username,ChatMessage.u.name,ChatMessage.msg,this.rid)
this.notificationService.ChatSendMessageNotification(memeberTosend[0].username,ChatMessage.u.name,ChatMessage.msg || "Anexo",this.rid)
} else {
var memeberTosend = this.ChatSystemService.getRoomById(this.rid).membersExcludeMe
var usersNames = [];
for(let i = 0; i < memeberTosend.length; i++) {
usersNames.push(memeberTosend[i].username)
}
this.notificationService.ChatSendMessageNotificationGrup(usersNames,ChatMessage.u.name,ChatMessage.msg,this.rid)
this.notificationService.ChatSendMessageNotificationGrup(usersNames,ChatMessage.u.name,ChatMessage.msg || "Anexo",this.rid)
}
@@ -766,6 +766,7 @@ export class RochetChatConnectorService {
setTimeout(()=>{
this.ws.wsMsgQueue()
}, 10)
console.log('rec conect')
if(this.wsReconnect >= 1) {
for (const [key, value] of Object.entries(this.wsCallbacks)) {
+56 -7
View File
@@ -42,6 +42,7 @@ export class RoomService {
name = ''
_updatedAt = {}
hasLoadHistory = false
DoneLoadingHistory = false
restoreFromOffline = false
duration = ''
isTyping = false
@@ -327,7 +328,7 @@ export class RoomService {
this.registerSendMessage(message)
message.from = 'stream'
message.loadHistory = this.hasLoadHistory
message.loadHistory = this.DoneLoadingHistory
this.lastMessage = message;
this.calDateDuration(ChatMessage._updatedAt);
@@ -352,6 +353,7 @@ export class RoomService {
this.messageUnread = true
// this.sortRoomList()
setTimeout(() => {
this.scrollDown()
}, 50)
@@ -550,6 +552,30 @@ export class RoomService {
}
/**
* @description delete message in the view
* @param id message ID
*/
async deleteMessageFromArray(_id) {
const id = _id
for (let i =0; i <= this.messages.length; i++) {
if(this.messages[i]?._id == id ) {
this.messages.splice(i, 1)
return true
} else {
//
}
}
}
deleteAll() {
this.messages.forEach((message) => {
if(message?._id) {
@@ -619,7 +645,7 @@ export class RoomService {
}
console.log('offlineChatMessage', offlineChatMessage)
//console.log('offlineChatMessage', offlineChatMessage)
this.message= ''
@@ -792,7 +818,7 @@ export class RoomService {
this.messages.push(cloneMessage as any)
console.log(currentDateMessage)
// console.log(currentDateMessage)
}
}
}
@@ -851,9 +877,6 @@ export class RoomService {
const messages = this.sortArrayISODate(await MessageModel.filter({rid:this.id}).execute()).reverse()
console.log('MessageModel', messages)
for (let ChatMessage of messages) {
@@ -907,6 +930,7 @@ export class RoomService {
// runs onces only
loadHistoryCount = 0
localMessages = []
async loadHistory({limit = 1000, forceUpdate = false }) {
if(forceUpdate == false) {
@@ -920,6 +944,8 @@ export class RoomService {
await this.restoreMessageFromDB()
const chatHistory: chatHistory = await this.RochetChatConnectorService.loadHistory(this.id, limit)
this.localMessages = this.messages.map( e => e._id)
if(chatHistory?.result?.messages) {
const users = this.getUsersByStatus('online')
@@ -955,6 +981,8 @@ export class RoomService {
}
this.DoneLoadingHistory = true
if(chatHistory?.result?.messages) {
if(!this.lastMessage) {
@@ -962,10 +990,31 @@ export class RoomService {
}
}
this.deletedMessages(chatHistory)
}
deletedMessages(chatHistory: chatHistory) {
const messagesToDelete = this.localMessages.filter( id => {
const found = chatHistory.result.messages.find( e => {
return e._id == id
})
if(!found) {
return true
}
return false
})
for (const id of messagesToDelete) {
if(id != '') {
this.deleteMessage(id)
}
}
}
addMessageDB = FIFOProcessQueue(async ({messagesToSave}, callback) => {
await messagesToSave.addMessageDB()
@@ -6,6 +6,7 @@
<ion-label class="title">{{ ChatSystemService.getGroupRoom(roomId).name.split('-').join(' ') }}</ion-label>
</div>
<div class="right">
<!-- <div (click)=" ChatSystemService.getGroupRoom(this.roomId).deleteAll()">delete all</div> -->
<button title="Menu" class="btn-no-color" (click)="openGroupMessagesOptions()">
<ion-icon *ngIf="ThemeService.currentTheme == 'default' " src="assets/images/icons-menu.svg"></ion-icon>
<ion-icon *ngIf="ThemeService.currentTheme == 'gov' " src="assets/images/theme/gov/icons-menu.svg"></ion-icon>
@@ -55,8 +56,8 @@
</div>
<div class="message">
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}} </pre>
<pre *ngIf="msg.delate == true" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}} </pre>
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre>
<pre *ngIf="msg.delate == true" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre>
<ion-label class="float-status-all float-status" *ngIf="msg.u.username==sessionStore.user.UserName">
@@ -5,7 +5,7 @@
<div class="middle">
<ion-label class="title">{{ ChatSystemService.getDmRoom(this.roomId).name }}</ion-label>
<!-- <button (click)="ChatMessageDebuggingPage()">Dev</button> -->
<span><ion-icon class="{{ ChatSystemService.getDmRoom(this.roomId).online }}" name="ellipse"></ion-icon></span>
<span><ion-icon *ngIf="RochetChatConnectorService.isLogin" class="{{ ChatSystemService.getDmRoom(this.roomId).online }}" name="ellipse"></ion-icon></span>
</div>
<div hidden class="right">
<button title="Menu" class="btn-no-color" (click)="_openMessagesOptions()">
@@ -37,6 +37,7 @@
<div class="messages" #scrollMe>
<ion-list>
<!-- <div (click)=" ChatSystemService.getDmRoom(this.roomId).deleteAll()">delete all</div> -->
<div class="messages-list-item-wrapper container-width-100"
*ngFor="let msg of ChatSystemService.getDmRoom(roomId).messages; index as i; let last = last" >
@@ -54,7 +55,7 @@
</div>
<div class="d-block justify-space-between">
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}} </pre>
<pre *ngIf="msg.delate == false" class="message-box text ma-0 font-13-rem" style="font-size: 0.8125rem !important;" >{{msg.msg}}</pre>
<!-- <ion-label *ngIf="msg.delate == false" class="message-box">{{msg.msg}} </ion-label> -->
<ion-label *ngIf="msg.delate == true" class="flex-0">Apagou a mensagem</ion-label>