sockeqwe / mosby

A Model-View-Presenter / Model-View-Intent library for modern Android apps
http://hannesdorfmann.com/mosby/
Apache License 2.0
5.49k stars 841 forks source link

pullToRefresh on error? #21

Closed IgorGanapolsky closed 9 years ago

IgorGanapolsky commented 9 years ago

Hi, why do you have the pullToRefresh parameter in ErrorMessageDeterminer here: https://github.com/sockeqwe/mosby/blob/master/sample-dagger2-rx/src/main/java/com/hannesdorfmann/mosby/sample/dagger2/model/ErrorMessageDeterminer.java#L10

sockeqwe commented 9 years ago

Thanks, that is missing. I have to add that.

The idea was to display different kind of error message depending on pull to refresh or not pull to refresh.

i.e.

The TextView that displays an error message (pullToRefresh == false) should show that kind of message:

An error has occurred. Please click here to retry.

And you can click on the error view to retry.

If error was on pull to refresh, then the error is displayed as toast, where "Please click to retry doesn't make sense and therefor only

An error has occurred

should be displayed as toast message