Skip to content

Commit

Permalink
Merge pull request #27 from Carifio24/no-refresh-on-list-change
Browse files Browse the repository at this point in the history
Don't refresh spell list if spell removed from table
  • Loading branch information
Carifio24 authored Feb 23, 2024
2 parents b71afd6 + 6d2f034 commit f2a4f34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Spellbook/SpellbookReducers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,11 @@ func togglePropertyReducer(action: TogglePropertyAction, state: inout SpellbookA
status.togglePrepared(action.spell)
break
}
if (profile.sortFilterStatus.statusFilterField == action.property) {
if (
profile.sortFilterStatus.statusFilterField == StatusFilterField.All
&&
profile.sortFilterStatus.statusFilterField == action.property
) {
state.filterAndSortSpells()
}
state.dirtySpellIDs = state.dirtySpellIDs + [action.spell.id]
Expand Down

0 comments on commit f2a4f34

Please sign in to comment.