Implement dynamic status update of the dictionaries #1400
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of changes
(See also the linked issue.) In summary, this change will make it such that if some dictionaries are fast to load and others are slow to load, the
↻
icon will only display on the dictionaries which haven't finished loading.Breaking change:
StenoLoadingManager.load()
returns a list of mixedDictionaryLoaderException
andJsonDictionary
etc. objects, only for theException
objects to be immediately converted intoErroredDictionary
object inengine.py
right after, nowload()
returns a list of mixedErroredDictionary
andJsonDictionary
objects which are homogeneous (both are instances ofStenoDictionary
).Note:
The favorite icon is not shown until all dictionaries are loaded (although it might be impossible to determine it correctly in advance before all dictionaries are loaded)
Note: make sure that there's no race condition and the final
dictionaries_changed
hook is always triggered later than thedictionary_state_changed
hooks.Closes #1331 .
Pull Request Checklist