Reset the root whenever selected event is changed

This commit is contained in:
SondreB 2022-12-31 17:28:44 +01:00
parent 31483ca9e3
commit d47d72ae10
No known key found for this signature in database
GPG Key ID: D6CC44C75005FDBF

View File

@ -166,6 +166,9 @@ export class ThreadService {
async changeSelectedEvent(eventId: string) {
this.hasLoaded = false;
this.#root = null;
this.#rootChanged.next(this.#root);
// Reset so UI doesn't show previous events.
this.#events = null;
this.#eventsChanged.next(this.#events);