mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
clear chat connection
This commit is contained in:
@@ -25,4 +25,6 @@ export abstract class IDexieRepository<T, R, I = EntityTable<any, any>> {
|
|||||||
abstract findAll(): Promise<RepositoryResult<T[], T>>
|
abstract findAll(): Promise<RepositoryResult<T[], T>>
|
||||||
|
|
||||||
abstract count(filter?: Object): Promise<RepositoryResult<number, T>>
|
abstract count(filter?: Object): Promise<RepositoryResult<number, T>>
|
||||||
|
|
||||||
|
abstract clear(): Promise<Result<any, any>>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,4 +253,13 @@ export class DexieRepository<T, R, I = EntityTable<any, any>> implements IDexieR
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async clear() {
|
||||||
|
try {
|
||||||
|
const result = await this.table.clear()
|
||||||
|
return ok(result)
|
||||||
|
} catch (e) {
|
||||||
|
return err(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ import { Cy } from 'cypress/enum'
|
|||||||
import { AgendaDataRepositoryService } from 'src/app/module/agenda/data/repository/agenda-data-repository.service';
|
import { AgendaDataRepositoryService } from 'src/app/module/agenda/data/repository/agenda-data-repository.service';
|
||||||
import { NotificationRepositoryService } from 'src/app/module/notification/data/notification-repository.service'
|
import { NotificationRepositoryService } from 'src/app/module/notification/data/notification-repository.service'
|
||||||
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service';
|
import { ChatServiceService } from 'src/app/module/chat/domain/chat-service.service';
|
||||||
|
import { chatDatabase } from 'src/app/infra/database/dexie/service';
|
||||||
|
import { RoomLocalRepository } from 'src/app/module/chat/data/repository/room/room-local-repository.service'
|
||||||
|
import { MessageLocalDataSourceService } from 'src/app/module/chat/data/repository/message/message-local-data-source.service'
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
@@ -58,7 +62,9 @@ export class LoginPage implements OnInit {
|
|||||||
private NotificationHolderService: NotificationHolderService,
|
private NotificationHolderService: NotificationHolderService,
|
||||||
public AgendaDataRepositoryService: AgendaDataRepositoryService,
|
public AgendaDataRepositoryService: AgendaDataRepositoryService,
|
||||||
private NotificationRepositoryService: NotificationRepositoryService,
|
private NotificationRepositoryService: NotificationRepositoryService,
|
||||||
private ChatServiceService: ChatServiceService
|
private ChatServiceService: ChatServiceService,
|
||||||
|
private RoomLocalRepository: RoomLocalRepository,
|
||||||
|
private MessageLocalDataSourceService: MessageLocalDataSourceService
|
||||||
|
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
@@ -170,8 +176,10 @@ export class LoginPage implements OnInit {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
await this.RoomLocalRepository.clear()
|
||||||
|
await this.MessageLocalDataSourceService.clear()
|
||||||
await this.NotificationRepositoryService.clearData()
|
await this.NotificationRepositoryService.clearData()
|
||||||
|
this.ChatServiceService.start()
|
||||||
|
|
||||||
await this.AgendaDataRepositoryService.clearSharedCalendar()
|
await this.AgendaDataRepositoryService.clearSharedCalendar()
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
export let versionData = {
|
export let versionData = {
|
||||||
"shortSHA": "5c755b71a",
|
"shortSHA": "e0bd6fdf4",
|
||||||
"SHA": "5c755b71ac7a384ea270b7f60a0d8308bbc3c6e3",
|
"SHA": "e0bd6fdf44eb7f2913357e9b8d1cc48c0a8866b7",
|
||||||
"branch": "feature/chat-new-api-peter",
|
"branch": "feature/chat-new-api-peter",
|
||||||
"lastCommitAuthor": "'Peter Maquiran'",
|
"lastCommitAuthor": "'Peter Maquiran'",
|
||||||
"lastCommitTime": "'Fri Sep 13 15:11:22 2024 +0100'",
|
"lastCommitTime": "'Fri Sep 13 15:14:59 2024 +0100'",
|
||||||
"lastCommitMessage": "remove console .log",
|
"lastCommitMessage": "remove static",
|
||||||
"lastCommitNumber": "6071",
|
"lastCommitNumber": "6072",
|
||||||
"changeStatus": "On branch feature/chat-new-api-peter\nYour branch is up to date with 'origin/feature/chat-new-api-peter'.\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/pages/gabinete-digital/despachos/despacho/despacho.page.ts",
|
"changeStatus": "On branch feature/chat-new-api-peter\nYour branch is up to date with 'origin/feature/chat-new-api-peter'.\n\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/infra/repository/adapter.ts\n\tmodified: src/app/infra/repository/dexie/dexie-repository.service.ts\n\tmodified: src/app/pages/login/login.page.ts\n\tmodified: version/git-version.ts",
|
||||||
"changeAuthor": "peter.maquiran"
|
"changeAuthor": "peter.maquiran"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user