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 is always false #51

Closed IgorGanapolsky closed 9 years ago

IgorGanapolsky commented 9 years ago

Hello, My Activity is extending MvpLceViewStateActivity. However, loadData(boolean pullToRefresh) method will always have pullToRefresh false. Please explain how I can make it true?

Thanks, Igor

sockeqwe commented 9 years ago

Hi, the idea is that this methud gets called from your pull to refresh mechanism as well like SwipeRefreshLayout and that one passes true as parameter. Have a look at the simple example (sample folder)

IgorGanapolsky commented 9 years ago

It does not have to be triggered by PullToRefresh action. This method is triggered when loading data when activity comes on the screen. On Jun 9, 2015 11:20 AM, "Hannes Dorfmann" notifications@github.com wrote:

Hi, the idea is that this methud gets called from your pull to refresh mechanism as well like SwipeRefreshLayout and that one passes true as parameter. Have a look at the simple example (sample folder)

— Reply to this email directly or view it on GitHub https://github.com/sockeqwe/mosby/issues/51#issuecomment-110399937.

sockeqwe commented 9 years ago

yes, if activity comes on screen then loadData(false) gets triggered. If you want to implement pull-to-refresh by using SwipeRefreshLayout then you should trigger manually from your OnRefreshListener loadData(true).

Igor Ganapolsky notifications@github.com schrieb am Di., 9. Juni 2015 17:22:

It does not have to be triggered by PullToRefresh action. This method is triggered when loading data when activity comes on the screen. On Jun 9, 2015 11:20 AM, "Hannes Dorfmann" notifications@github.com wrote:

Hi, the idea is that this methud gets called from your pull to refresh mechanism as well like SwipeRefreshLayout and that one passes true as parameter. Have a look at the simple example (sample folder)

— Reply to this email directly or view it on GitHub https://github.com/sockeqwe/mosby/issues/51#issuecomment-110399937.

— Reply to this email directly or view it on GitHub https://github.com/sockeqwe/mosby/issues/51#issuecomment-110400912.