Davejkane / riv

Riv - The Rust Image Viewer
MIT License
99 stars 10 forks source link

Decouple rendering of UI from internal state (such as images held) #28

Closed gurgalex closed 5 years ago

gurgalex commented 5 years ago

I think this would make writing tests easier, as the internal state of the application (ex. current image index) could be tested before and after without needing to spawn an sdl2 window.

Davejkane commented 5 years ago

Yeah, I'm already starting to get a little weary of the Program god struct. Is this something you'd like to take a look at? If you have something in particular in mind?

gurgalex commented 5 years ago

Yeah, I'd like to take a look at it.

Seperating images, dest_folder, index from the UI is a start.

Communicating data changes to and from the UI / data source

Example data structure and communication. I'll see how it goes. see fn update_counter https://azul.rs/

I'm sure there are other ways to go about making testing / splitting up easier.

Davejkane commented 5 years ago

I'm taking care of this in the info bar branch.