mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
fix open pdf and member list
This commit is contained in:
@@ -38,9 +38,9 @@ export class RoomStore {
|
||||
messageTypingSubject: Subscription
|
||||
messageOnReconnectSubject: Subscription
|
||||
messageOnSetRoomId: Subscription
|
||||
messageRoomData: Subscription
|
||||
newMessagesStream!: Subscription
|
||||
|
||||
roomData$: Observable<RoomTable | undefined>
|
||||
roomStatus$: DexieObservable<Boolean >
|
||||
roomMessage$: DexieObservable<MessageTable[]>
|
||||
roomMembers$: Observable<MemberTable[] | undefined>
|
||||
@@ -71,10 +71,41 @@ export class RoomStore {
|
||||
} else {
|
||||
await this.getMessages()
|
||||
}
|
||||
|
||||
this.messageRoomData?.unsubscribe();
|
||||
|
||||
this.messageRoomData = this.RoomLocalRepository.getRoomByIdLive(this.room.$id).subscribe(e => {
|
||||
if(e) {
|
||||
this.room = new RoomViewModel(e)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
this.messageOnSetRoomId?.unsubscribe()
|
||||
|
||||
if(this.room.local == IDBoolean.true) {
|
||||
this.messageOnSetRoomId = this.chatServiceService.roomDirectOnSetId({$roomId: this.room.$id}).subscribe((data) => {
|
||||
this.messageOnSetRoomId?.unsubscribe()
|
||||
|
||||
this.room = new RoomViewModel(data)
|
||||
|
||||
const hasMyMessage = this.messages1[this.room.$id].find(e => e.sender.wxUserId == SessionStore.user.UserId)
|
||||
|
||||
if(!hasMyMessage) {
|
||||
setTimeout(() => {
|
||||
this.getMessages()
|
||||
}, 500)
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.subscribeToChanges()
|
||||
}, 500)
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
stop() {
|
||||
this.messageReceiveSubject?.unsubscribe();
|
||||
this.messageReceiveSubject?.unsubscribe();
|
||||
this.messageDeleteSubject?.unsubscribe();
|
||||
this.messageUpdateSubject?.unsubscribe();
|
||||
@@ -194,6 +225,8 @@ export class RoomStore {
|
||||
}
|
||||
}
|
||||
|
||||
this.sendReadMessage()
|
||||
|
||||
setTimeout(() => {
|
||||
this.scrollToBottomClicked()
|
||||
}, 100)
|
||||
|
||||
Reference in New Issue
Block a user