Skip to content

feat(ios): pageIndex of ViewPager auto update after data changes#3852

Merged
wwwcg merged 1 commit intoTencent:v2.15.xfrom
wwwcg:v2.15.x
May 15, 2024
Merged

feat(ios): pageIndex of ViewPager auto update after data changes#3852
wwwcg merged 1 commit intoTencent:v2.15.xfrom
wwwcg:v2.15.x

Conversation

@wwwcg
Copy link
Copy Markdown
Collaborator

@wwwcg wwwcg commented May 15, 2024

Pre-PR Checklist

  • I added/updated relevant documentation.
  • I followed the Convention Commit guideline with maximum 72 characters to submit commit message.
  • I squashed the repeated code commits.
  • I signed the [CLA].
  • I added/updated test cases to check the change I am making.
  • All existing and new tests are passing.

Also fixed the issue of missing onPageSelected callbacks upon first entry;

The logic for automatic updates keep same with Android, as follows
1. If the previous item only changes its location,
update the current location and keep the current item displayed.
2. If the previous item does not exist, do not adjust the position,
but keep the current position in the valid range (that is, 0 ~ count-1).
@wwwcg wwwcg merged commit 515bf22 into Tencent:v2.15.x May 15, 2024
@wwwcg wwwcg deleted the v2.15.x branch May 15, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant