Tuesday, May 28, 2024
1 change · master
Code cleanup and technical improvements
The accounting interface code for attachment previews was simplified without changing user-facing behavior. This makes the area easier to maintain and reduces the chance of future issues when developers update it.
Original PR description
`attachmentPreviewState.previewEnabled` was more complex than needed: it was a state solely made to make a getter reactive, due to lack of observing UI service state reactively with `useState()`. By putting `useState()` around the ui service in the component, this let us simplify the code of `previewEnabled` to simplify it being a getter.