소스 검색

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