mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-04 01:19:41 +00:00
Merge branch 'develop' into travis/remove-skinning
This commit is contained in:
@@ -253,6 +253,9 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
private filterValidCards(rightPanelForRoom?: IRightPanelForRoom) {
|
||||
if (!rightPanelForRoom?.history) return;
|
||||
rightPanelForRoom.history = rightPanelForRoom.history.filter((card) => this.isCardStateValid(card));
|
||||
if (!rightPanelForRoom.history.length) {
|
||||
rightPanelForRoom.isOpen = false;
|
||||
}
|
||||
}
|
||||
|
||||
private isCardStateValid(card: IRightPanelCard) {
|
||||
@@ -263,7 +266,11 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||
// or potentially other errors.
|
||||
// (A nicer fix could be to indicate, that the right panel is loading if there is missing state data and re-emit if the data is available)
|
||||
switch (card.phase) {
|
||||
case RightPanelPhases.ThreadPanel:
|
||||
if (!SettingsStore.getValue("feature_thread")) return false;
|
||||
break;
|
||||
case RightPanelPhases.ThreadView:
|
||||
if (!SettingsStore.getValue("feature_thread")) return false;
|
||||
if (!card.state.threadHeadEvent) {
|
||||
console.warn("removed card from right panel because of missing threadHeadEvent in card state");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user