Remove completed quests from compare
This commit is contained in:
parent
869f74d4f9
commit
a12ada69b3
1 changed files with 4 additions and 0 deletions
|
|
@ -450,6 +450,10 @@ export class CharacterController {
|
|||
const existingQuest = categories[category].find(q => q.id === quest.id);
|
||||
if (existingQuest) {
|
||||
existingQuest[source] = quest.status;
|
||||
// Remove quest if both characters have completed it
|
||||
if (existingQuest.char1Status === 'Completed' && existingQuest.char2Status === 'Completed') {
|
||||
categories[category] = categories[category].filter(q => q.id !== quest.id);
|
||||
}
|
||||
} else {
|
||||
categories[category].push({
|
||||
id: quest.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue