Repository navigation
Conversation
|
|
I believe this was by design... I am sure there are some improvements from here we should be able to adopt but this could need a bit more consideration. |
Maybe my initial explanation was a little unclear (or I am misunderstanding?) - all the model logic (ie stuff that modifies AlarmTreeItem<?>) still occurs off of the UI thread. The changes here only brings a little bit more code into the UI rendering so that all the code which interacts with the UI is on the same thread at the same time, since previously there was a split which introduced race conditions. Putting aside the initial startup code, the |
|
@shroffk coming back to this I think I see where the confusion came from, 'Updates to the model were not processed on the UI thread' is quite confusing wording. What I meant was that some code which applies to the UI any updates to the model (which in turn of course are made by the alarm model thread) was not running on the UI thread. This led to various race conditions which only surfaced when I was implementing the search box. Fixing this should not really affect anything performance-wise, nor does it change the behaviour in any tangible way (AFAIK). I am not 100% sure about the Regarding the performUpdates - this runs UI code off the UI thread, and it should definitely not be doing that. The reason I'm fairly confident this is unintentional is
But please let me know if you have questions :) I appreciate it is a bit of a gnarly change |



While trying to implement a search bar for the alarm tree, I ran into a few issues:
itemAddedanditemRemovedobtained the view item's parent on a separate thread, and then re-used that in code running on the UI thread later, same issues as above.tl;dr: made stuff which touches the UI run on the UI thread
Checklist
Testing:
Documentation: