Эх сурвалжийг харах

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

Warafear 9 сар өмнө
parent
commit
200861ea97

+ 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);
         }
       },
     );