Skip to content

Commit

Permalink
fix: mis-scrolling when pulling archive but canceled.
Browse files Browse the repository at this point in the history
If you enter any scrolling issue in main dialog in main dialog,
tell me in Telegram Group Please.

Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com>
  • Loading branch information
NextAlone committed Jan 8, 2024
1 parent 6f307bf commit 4a90cdc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1992,9 +1992,9 @@ protected void onMeasure(int widthSpec, int heightSpec) {
RecyclerView.ViewHolder holder = parentPage.listView.findViewHolderForAdapterPosition(pos);
if (holder != null) {
int top = holder.itemView.getTop();
if (parentPage.dialogsType == DIALOGS_TYPE_DEFAULT && hasHiddenArchive() && parentPage.archivePullViewState == ARCHIVE_ITEM_STATE_HIDDEN) {
pos = Math.max(1, pos);
}
// if (parentPage.dialogsType == DIALOGS_TYPE_DEFAULT && hasHiddenArchive() && parentPage.archivePullViewState == ARCHIVE_ITEM_STATE_HIDDEN) {
// pos = Math.max(1, pos);
// }
ignoreLayout = true;
parentPage.layoutManager.scrollToPositionWithOffset(pos, (int) (top - lastListPadding + scrollAdditionalOffset + parentPage.pageAdditionalOffset));
ignoreLayout = false;
Expand Down

0 comments on commit 4a90cdc

Please sign in to comment.