fix message

This commit is contained in:
Peter Maquiran
2025-01-14 15:16:29 +01:00
parent 33401c37d0
commit 6e84945cfd
2 changed files with 13 additions and 9 deletions
@@ -91,7 +91,7 @@ export class GetRoomListUseCaseService {
// console.log({roomsToDelete, roomsToInsert, roomsToUpdate})
// sometime api return duplicated rooms
const insertedIds = []
const insertedIds: string[] = []
if(roomsToInsert) {
const roomsToInsertEntity = GetRoomListMapper.toDomain(roomsToInsert)
@@ -115,7 +115,7 @@ export class GetRoomListUseCaseService {
} else {
// prevent to insert the same room due to server duplication
if(!insertedIds.find(e => room.id)) {
if(!insertedIds.find(e => room.id == e)) {
const createResult = this.roomLocalDataSourceService.insert(room)
@@ -123,9 +123,13 @@ export class GetRoomListUseCaseService {
createResult.then((result) => {
if(result.isErr()) {
console.log('error', result.error)
console.error('error', result.error)
}
}).catch(e => {
console.error('error on insert', e);
})
} else {
console.error('server duplication', room.id, insertedIds.toString())
}
}
+6 -6
View File
@@ -1,11 +1,11 @@
export let versionData = {
"shortSHA": "18a8d90d9",
"SHA": "18a8d90d99923c440618cbee806879ee131bca03",
"shortSHA": "33401c37d",
"SHA": "33401c37d0bf8b52941826a8703a80d9c651f8ea",
"branch": "feature/login-v2",
"lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Mon Dec 16 12:04:02 2024 +0100'",
"lastCommitMessage": "notification and chat slow",
"lastCommitNumber": "6136",
"changeStatus": "On branch feature/login-v2\nYour branch is ahead of 'origin/feature/login-v2' by 1 commit.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tnew file: android/app/google-services.json\n\tnew file: android/app/src/main/AndroidManifest.xml\n\tnew file: android/app/src/main/res/drawable-land-hdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-land-ldpi/splash.png\n\tnew file: android/app/src/main/res/drawable-land-mdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-land-xhdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-land-xxhdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-land-xxxhdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-port-hdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-port-ldpi/splash.png\n\tnew file: android/app/src/main/res/drawable-port-mdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-port-xhdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-port-xxhdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-port-xxxhdpi/splash.png\n\tnew file: android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml\n\tnew file: android/app/src/main/res/drawable/ic_launcher_background.xml\n\tnew file: android/app/src/main/res/drawable/splash.png\n\tnew file: android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml\n\tnew file: android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml\n\tnew file: android/app/src/main/res/mipmap-hdpi/ic_launcher.png\n\tnew file: android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png\n\tnew file: android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png\n\tnew file: android/app/src/main/res/mipmap-mdpi/ic_launcher.png\n\tnew file: android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png\n\tnew file: android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png\n\tnew file: android/app/src/main/res/mipmap-xhdpi/ic_launcher.png\n\tnew file: android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png\n\tnew file: android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png\n\tnew file: android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png\n\tnew file: android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png\n\tnew file: android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png\n\tnew file: android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png\n\tnew file: android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png\n\tnew file: android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png\n\tmodified: readme.md\n\tmodified: src/app/core/chat/usecase/message/message-create-use-case.service.ts\n\tmodified: src/app/core/chat/usecase/message/message-update-by-id-use-case.service.ts\n\tmodified: src/app/infra/http/http.service.ts\n\tmodified: src/app/services/decorator/api-validate-schema.decorator.ts\n\tmodified: src/app/ui/chat/modal/chat-popover/chat-popover.page.html\n\tmodified: src/app/ui/chat/modal/chat-popover/chat-popover.page.ts\n\tmodified: version/git-version.ts\n\nChanges not staged for commit:\n (use \"git add <file>...\" to update what will be committed)\n (use \"git restore <file>...\" to discard changes in working directory)\n\tmodified: src/app/core/chat/usecase/message/message-update-by-id-use-case.service.ts",
"lastCommitTime": "'Tue Jan 14 14:56:57 2025 +0100'",
"lastCommitMessage": "fixslow send",
"lastCommitNumber": "6137",
"changeStatus": "On branch feature/login-v2\nYour branch is ahead of 'origin/feature/login-v2' by 2 commits.\n (use \"git push\" to publish your local commits)\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/core/chat/usecase/room/room-get-list-use-case.service.ts\n\tmodified: version/git-version.ts",
"changeAuthor": "peter.maquiran"
}