Hello, thank you for your response! Yes, there is a nice and clean way to cover the scenario you described.

Let’s start with the view state:

Then create intent for loading countries:

In your fragment, let’s override the “emitIntents” method:

This approach will emit “LoadCountries” intent when the fragment onResume method will be called.

Then in presenter:

And

And

So we are checking if the list is already loaded or not. If the list is empty, we are loading a new one, if the list is already loaded and not empty, we are not emitting any new partial state.

The partial state will look like:

and the last thing — render method in the fragment:

--

--

The technology partner for growing businesses. We help companies to build software, websites, and apps. Visit amsterdamstandard.com for more information.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Amsterdam Standard

Amsterdam Standard

The technology partner for growing businesses. We help companies to build software, websites, and apps. Visit amsterdamstandard.com for more information.