mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-01-01 13:57:10 +01:00
Fix scroll to wrong next or previous parent comment position in ViewPostDetailFragment.
This commit is contained in:
parent
7db721f297
commit
6e4a808cbb
@ -12,7 +12,6 @@ import android.graphics.drawable.Drawable;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.HapticFeedbackConstants;
|
import android.view.HapticFeedbackConstants;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -1665,7 +1664,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
|
|||||||
if (nextParentPosition < 0) {
|
if (nextParentPosition < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mSmoothScroller.setTargetPosition(nextParentPosition);
|
mSmoothScroller.setTargetPosition(mCommentsRecyclerView == null ? nextParentPosition + 1 : nextParentPosition);
|
||||||
if (mLinearLayoutManager != null) {
|
if (mLinearLayoutManager != null) {
|
||||||
mIsSmoothScrolling = true;
|
mIsSmoothScrolling = true;
|
||||||
mLinearLayoutManager.startSmoothScroll(mSmoothScroller);
|
mLinearLayoutManager.startSmoothScroll(mSmoothScroller);
|
||||||
@ -1682,7 +1681,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
|
|||||||
if (nextParentPosition < 0) {
|
if (nextParentPosition < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mSmoothScroller.setTargetPosition(nextParentPosition);
|
mSmoothScroller.setTargetPosition(mCommentsRecyclerView == null ? nextParentPosition + 1 : nextParentPosition);
|
||||||
if (mLinearLayoutManager != null) {
|
if (mLinearLayoutManager != null) {
|
||||||
mIsSmoothScrolling = true;
|
mIsSmoothScrolling = true;
|
||||||
mLinearLayoutManager.startSmoothScroll(mSmoothScroller);
|
mLinearLayoutManager.startSmoothScroll(mSmoothScroller);
|
||||||
|
Loading…
Reference in New Issue
Block a user