Shan
03/09/2019, 11:26 AMlabel
, and then save it. Once saved, (or I guess, "committed" via the model) the name needs to be updated in several difference places within the application. Right now how I'm doing it is when the label
is instantiated, it is added to a map which contains the label's string name, and a random UUID (to prevent issues with two names that are the same). I then set a listener on that map everywhere I need to update the name, and when I 'save' within the renaming fragment, I update the map entry with the new string, which then sets it elsewhere in the application. I'm trying to rewrite this using a ViewModel, but am unsure if I'm on the right track (or understanding it properly). I was thinking something like this? Is this the right setup? (Have some questions in the comments in the snippet)Shan
03/09/2019, 11:41 AMShan
03/09/2019, 11:50 AM