aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-02-03 10:23:56 -0500
committerbobzel <zzzman@gmail.com>2025-02-03 10:23:56 -0500
commit1e673454f8cabf894e8dfec36734d2cb41caa7b1 (patch)
tree6cdd3864b5802c7f8dcadf6bf0a06701b1110e6d /src/client/views/collections
parent573a052cc4778ef4df53e9911db07e998df06281 (diff)
changed filter 'check' to be exact match and 'match' to be substring. fixed GPTpopup filtering to use a #chat tag instead of a chatFilter field.
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionCardDeckView.tsx11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx
index f24673c39..43464e50c 100644
--- a/src/client/views/collections/CollectionCardDeckView.tsx
+++ b/src/client/views/collections/CollectionCardDeckView.tsx
@@ -85,6 +85,10 @@ export class CollectionCardView extends CollectionSubView() {
});
componentDidMount() {
+ this._disposers.chatVis = reaction(
+ () => GPTPopup.Instance.Visible,
+ vis => !vis && this.onGptHide()
+ );
GPTPopup.Instance.setRegenerateCallback(this.Document, this.childPairStringListAndUpdateSortDesc);
this._props.setContentViewBox?.(this);
// if card deck moves, then the child doc views are hidden so their screen to local transforms will return empty rectangles
@@ -106,6 +110,7 @@ export class CollectionCardView extends CollectionSubView() {
);
}
+ onGptHide = () => Doc.setDocFilter(this.Document, 'tags', '#chat', 'remove');
componentWillUnmount() {
GPTPopup.Instance.setSortDesc('');
GPTPopup.Instance.onSortComplete = undefined;
@@ -445,7 +450,7 @@ export class CollectionCardView extends CollectionSubView() {
if (questionType === '2' || questionType === '4') {
this.childDocs.forEach(d => {
- d.chatFilter = false;
+ TagItem.removeTagFromDoc(d, '#chat');
});
}
@@ -471,8 +476,8 @@ export class CollectionCardView extends CollectionSubView() {
break;
case '2':
case '4':
- doc.chatFilter = true;
- Doc.setDocFilter(DocCast(this.Document), 'chatFilter', true, 'check');
+ TagItem.addTagToDoc(doc, '#chat');
+ Doc.setDocFilter(this.Document, 'tags', '#chat', 'check');
break;
}
} else {