diff options
Diffstat (limited to 'src/client/views')
| -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 } + + } |
