Commit 205179a
authored
Fix most-recently-used-entry delete bug (#1296)
This is a follow up PR to #1252 where during QA testing @longrunningprocess discovered a bug whereby deleting an entry caused the MRU cache and URL to not be updated, thereby creating a situation where the app could go to an invalid state.
Addresses testing and comments called out in #1252
Also contains an unrelated tweak to a GH issue template 😁
* use editEntryAndScroll() in deleteEntry()
This replaces the low-level setCurrentEntry() method with the higher-level editEntryAndScroll() method that we use to change entry state. The higher-level method handles URL updating and MRU cache updates among other things.
This fixes a bug where deleting an entry did not update the URL or update the MRU cache, which could result in an error state under certain circumstances.
* check MRU entry actually exists
Add a check to ensure the MRU entry actually exists in the list before setting the entryId.
The previous commit ensures that the MRU cache is updated upon deleting an entry, so I'm not 100% sure that this check is needed, but it shouldn't hurt, so I think it's safe to add as a precaution against an invalid state.
* tweak S/R GH issue template1 parent fa786ae commit 205179a
2 files changed
Lines changed: 3 additions & 3 deletions
File tree
- .github/ISSUE_TEMPLATE
- src/angular-app/languageforge/lexicon/editor
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
| 531 | + | |
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
| |||
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
985 | | - | |
| 985 | + | |
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| |||
0 commit comments