There's a lot going on in this program, and we're using Status type a lot. I was going to use Status type for a Random script but thought better of it.
- A
Random value is always going to return something (if it's set up properly)
- In this file I'm calling a function that cycles through
model.status — in fact model.status is getting checked in 3 or more locations
- It's a little confusing to me why we're having to use
selectedUrl and casing on the Status again.
- The only reason I can think that
GotRandomPhoto photo and ClickedPhoto url require to call selectedUrl function (which cases on the Status) is that we need to check if the photos are in an unloaded state.
- But why couldn't we make the images unclickable or something, rather than casing on it in too many places?
There's a lot going on in this program, and we're using
Statustype a lot. I was going to useStatustype for aRandomscript but thought better of it.Randomvalue is always going to return something (if it's set up properly)model.status— in factmodel.statusis getting checked in 3 or more locationsview,update, and a helper function.selectedUrland casing on theStatusagain.GotRandomPhoto photoandClickedPhoto urlrequire to callselectedUrlfunction (which cases on theStatus) is that we need to check if the photos are in an unloaded state.