This commit is contained in:
Peter Maquiran
2022-12-17 17:08:13 +01:00
parent 8aea090a37
commit 75b74a0a09
8 changed files with 22 additions and 19 deletions
+10 -4
View File
@@ -18,6 +18,7 @@ import { ChatMethodsService } from './chat-methods.service';
import { AESEncrypt } from '../aesencrypt.service'
import { AttachmentsService } from 'src/app/services/attachments.service';
import { NetworkServiceService} from 'src/app/services/network-service.service';
import { JsonStore } from '../jsonStore.service';
@Injectable({
providedIn: 'root'
@@ -273,6 +274,7 @@ export class ChatSystemService {
}
}
this.loadingWholeList = false
await this.storage.set('Rooms', rooms);
setTimeout(() => {
@@ -284,7 +286,6 @@ export class ChatSystemService {
this.sortRoomList()
}, 10000)
this.loadingWholeList = false
}
/**
@@ -575,9 +576,14 @@ export class ChatSystemService {
})[0]
if(roomName) {
const firstName = capitalizeTxt(roomName.split('.')[0])
const lastName = capitalizeTxt(roomName.split('.')[1])
return firstName + ' ' + lastName
try {
const firstName = capitalizeTxt(roomName.split('.')[0])
const lastName = capitalizeTxt(roomName.split('.')[1])
return firstName + ' ' + lastName
} catch(e) {
return roomData['membersExcludeMe'][0].name
}
} else if(roomData.name) {
return roomData.name
} else {