Skip to content

Favoriting a post

Mike Burns requested to merge 9-favorite into master

Add a status interaction for favoriting a post. This involves three callbacks: start, success, failure. Track the state by mutating the Status instance. Use the state to toggle between fav and un-fav.

The UI interaction is either a double-tap on the image area or a single tap on the heart icon. The heart icon indicates the state: unfavorited, in progress, favorited, failure.

The gesture detector (for detecting double tap) requires a Context (due to a mistake in the Android API, I feel) so pass a lambda that closes over the context through to the ViewHolder.

Closes #9 (closed)

Merge request reports