Fix useless refresh on welcome home screen (#7268)
If the user hasn't subscribed to any podcasts a welcome segment is shown on the homescreen. However, the scrollview with a refresh below was still there which was not only useless but could trigger an refresh at the wrong position and also tint the app bar.
This commit is contained in:
parent
52117f35ac
commit
e51b0a3695
@ -184,6 +184,10 @@ public class HomeFragment extends Fragment implements Toolbar.OnMenuItemClickLis
|
||||
.subscribe(numEpisodes -> {
|
||||
viewBinding.welcomeContainer.setVisibility(numEpisodes == 0 ? View.VISIBLE : View.GONE);
|
||||
viewBinding.homeContainer.setVisibility(numEpisodes == 0 ? View.GONE : View.VISIBLE);
|
||||
viewBinding.swipeRefresh.setVisibility(numEpisodes == 0 ? View.GONE : View.VISIBLE);
|
||||
if (numEpisodes == 0) {
|
||||
viewBinding.homeScrollView.setScrollY(0);
|
||||
}
|
||||
}, error -> Log.e(TAG, Log.getStackTraceString(error)));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user