Skip to content

manager: add animation to page back navigation#3197

Merged
YuKongA merged 2 commits into
tiann:mainfrom
u9521:anim-fix
Feb 3, 2026
Merged

manager: add animation to page back navigation#3197
YuKongA merged 2 commits into
tiann:mainfrom
u9521:anim-fix

Conversation

@u9521

@u9521 u9521 commented Feb 3, 2026

Copy link
Copy Markdown
Contributor

add missing superuser and module card navigation on the homepage and returning with new animations.

Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a shared pager-navigation state to centralize animated tab/page transitions, enabling homepage cards and back navigation to use the same animation behavior.

Changes:

  • Introduce MainPagerState (+ rememberMainPagerState) to encapsulate animated pager navigation and selection tracking.
  • Wire LocalMainPagerState through MainScreen and migrate BottomBar/Home card navigation to call animateToPage(...).
  • Update back handling to animate returning to page 0 via the new shared pager state.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Home.kt Switch homepage Superuser/Module card clicks to animated pager navigation via LocalMainPagerState.
manager/app/src/main/java/me/weishu/kernelsu/ui/component/BottomBar.kt Refactor bottom bar paging animation/selection logic into MainPagerState; BottomBar now delegates to it.
manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt Provide LocalMainPagerState, keep selection synced, and use it for animated “back to home page” behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread manager/app/src/main/java/me/weishu/kernelsu/ui/MainActivity.kt Outdated
- Remove unused `LocalPagerState` CompositionLocal.
- Use `mainPagerState.pagerState` directly in `LaunchedEffect` and `HorizontalPager`.
- Clean up `CompositionLocalProvider` by removing the `LocalPagerState` provider.

Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
@YuKongA YuKongA merged commit 4566823 into tiann:main Feb 3, 2026
@u9521 u9521 deleted the anim-fix branch February 3, 2026 12:57
KOWX712 pushed a commit to KOWX712/KernelSU that referenced this pull request Feb 4, 2026
add missing superuser and module card navigation on the homepage and
returning with new animations.

---------

Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
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.

3 participants