This repository has been archived by the owner on Sep 8, 2024. It is now read-only.
Bug Fix - Don't clear namespace on every system page call #2814
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.
Description
Calling self.clear() on every show some system page event causes mycroft to remove the namespace from active index and reinsert it constantly with a flood of messages, skills showing a page of text self.gui.show_text() for example should only emit the data changes and not try reinserting and removing skill namespace constantly. If an skill author wants to clear the data they can manually call the self.gui.clear() method before calling self.gui.show_text()
How to test
Use self.gui.show_text("some text..") in a while loop and make sure it does not keep removing and re inserting the skill namespace from active skill index only sends the set data message with the changed data values
Contributor license agreement signed?
CLA [x] (Whether you have signed a CLA - Contributor Licensing Agreement