diff options
| author | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-05-18 03:20:57 -0400 |
|---|---|---|
| committer | aidahosa1 <aisosa_idahosa@brown.edu> | 2024-05-18 03:20:57 -0400 |
| commit | 184d078644806668a213aa7fd4ed242bb24a2932 (patch) | |
| tree | f2b0992cecb4792a129cc61af48adcb7aa49b717 /src/client/views/collections | |
| parent | 68b00ed7e782fd237cdcdcb30f55814874854187 (diff) | |
done fr perchance
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/CollectionCardDeckView.tsx | 15 |
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 } + + } |
