aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionCardDeckView.tsx
diff options
context:
space:
mode:
authoraidahosa1 <aisosa_idahosa@brown.edu>2024-05-18 03:20:57 -0400
committeraidahosa1 <aisosa_idahosa@brown.edu>2024-05-18 03:20:57 -0400
commit184d078644806668a213aa7fd4ed242bb24a2932 (patch)
treef2b0992cecb4792a129cc61af48adcb7aa49b717 /src/client/views/collections/CollectionCardDeckView.tsx
parent68b00ed7e782fd237cdcdcb30f55814874854187 (diff)
done fr perchance
Diffstat (limited to 'src/client/views/collections/CollectionCardDeckView.tsx')
-rw-r--r--src/client/views/collections/CollectionCardDeckView.tsx15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionCardDeckView.tsx b/src/client/views/collections/CollectionCardDeckView.tsx
index 2ca03a40d..f2da61844 100644
--- a/src/client/views/collections/CollectionCardDeckView.tsx
+++ b/src/client/views/collections/CollectionCardDeckView.tsx
@@ -325,8 +325,8 @@ export class CollectionCardView extends CollectionSubView() {
break;
case 'gpt':
- typeA = this.gptGroups.get(docA.layout) ?? '9999';
- typeB = this.gptGroups.get(docB.layout) ?? '9999';
+ typeA = this.getButtonGroup(99999, docA.layout, true) ?? '9999';
+ typeB = this.getButtonGroup(99999, docB.layout, true) ?? '9999';
break;
default:
@@ -648,6 +648,7 @@ export class CollectionCardView extends CollectionSubView() {
const doc = this.textToDoc.get(part);
if (doc) {
this.gptGroups.set(doc, index);
+ doc.chatGroup = index
}
}
});
@@ -691,7 +692,7 @@ export class CollectionCardView extends CollectionSubView() {
if (this.amGPTGroups > 4){
amButtons = this.amGPTGroups;
}
- activeButtonIndex = this.gptGroups.get(doc);
+ activeButtonIndex = this.getButtonGroup(9999, doc, true);
}
for (let i = 0; i < amButtons; i++) {
@@ -713,7 +714,11 @@ export class CollectionCardView extends CollectionSubView() {
);
}
- getButtonGroup(groupNumber: number, doc: Doc) {
+ getButtonGroup(groupNumber: number, doc: Doc, isChat?: boolean) {
+ if (isChat){
+ return NumCast(doc.chatGroup)
+ }
+
switch (groupNumber){
case 0:
return NumCast(doc.custom1Group)
@@ -724,6 +729,8 @@ export class CollectionCardView extends CollectionSubView() {
default:
break
}
+
+
}