Преглед на файлове

fixed a bug where removed spells were not removed from favorites list

Warafear преди 9 месеца
родител
ревизия
200861ea97
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/app/journal/journal-spellbook/journal-spellbook.component.ts

+ 2 - 0
src/app/journal/journal-spellbook/journal-spellbook.component.ts

@@ -320,6 +320,7 @@ export class JournalSpellbookComponent {
         if (result.state === 'delete') {
           result.data.forEach((spell: Spell) => {
             this.dataAccessor.deleteCustomSpell(spell);
+            this.dataAccessor.removeFavoriteSpell(spell);
             this.deleteSpellFromPrepared(spell);
           });
           this.refreshFilteredSpells();
@@ -396,6 +397,7 @@ export class JournalSpellbookComponent {
           this.addSpellToPrepared(spell);
         } else if (message.action === 'removeFromPrepared') {
           this.removeSpellFromPrepared(spell);
+          this.dataAccessor.removeFavoriteSpell(spell);
         }
       },
     );