changed comments fragment loading animation
This commit is contained in:
parent
7047b62442
commit
66c753f3a3
|
@ -70,7 +70,7 @@ import static org.schabi.newpipe.util.AnimationUtils.animateView;
|
|||
public class CommentsFragment extends BaseListInfoFragment<CommentsInfo> {
|
||||
|
||||
private CompositeDisposable disposables = new CompositeDisposable();
|
||||
|
||||
private boolean initialLoad = true;
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Views
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
@ -152,6 +152,10 @@ public class CommentsFragment extends BaseListInfoFragment<CommentsInfo> {
|
|||
@Override
|
||||
public void handleResult(@NonNull CommentsInfo result) {
|
||||
super.handleResult(result);
|
||||
if(initialLoad){
|
||||
itemsList.smoothScrollToPosition(infoListAdapter.getItemCount());
|
||||
initialLoad = false;
|
||||
}
|
||||
|
||||
if (!result.getErrors().isEmpty()) {
|
||||
showSnackBarError(result.getErrors(), UserAction.REQUESTED_COMMENTS, NewPipe.getNameOfService(result.getServiceId()), result.getUrl(), 0);
|
||||
|
|
|
@ -338,7 +338,7 @@ public class NavigationHelper {
|
|||
String url,
|
||||
String name) {
|
||||
if (name == null) name = "";
|
||||
defaultTransaction(fragmentManager)
|
||||
fragmentManager.beginTransaction().setCustomAnimations(R.anim.switch_service_in, R.anim.switch_service_out)
|
||||
.replace(R.id.fragment_holder, CommentsFragment.getInstance(serviceId, url, name))
|
||||
.addToBackStack(null)
|
||||
.commit();
|
||||
|
|
Loading…
Reference in New Issue