I have two appVariables.
One which is the ‘fullRecordList’ which is retrieved from an API call on the home page.
It creates repeat tiles using the repeat function.
Then when someone clicks on the repeater tile of their choice, I send the
repeat.current object to another separate appVariable called ‘currentlyChangingRecord’.
This is working great - however if someone updates ‘currentlyChangingRecord’ using the UI - it is ALSO UPDATING IN THE fullRecordList! Even though I assigned the
repeat.current out to another variable.
Is there a way I can detatch this relationship so that the fullRecordList remains unedited? I want that to be controled by the API calls only.
Ask and you shall find…the answer yourself…literally not 8 minutes later
So setAppVariable with
repeat.current was creating a live data relationship between the two.
I think this for the most part is intended.
In the end I simply did
Bascially this is encoding the object into a string, and then de-coding it back into an object.
But in doing so - it breaks the connection between the appVariable and the globalVariable.
Hope this helps anyone who is looking for immutable variables.