Skip to content

manager: Refactor manager screens to unified UiState and actions#3283

Merged
YuKongA merged 17 commits into
tiann:mainfrom
u9521:mui-refactor
Mar 13, 2026
Merged

manager: Refactor manager screens to unified UiState and actions#3283
YuKongA merged 17 commits into
tiann:mainfrom
u9521:mui-refactor

Conversation

@u9521

@u9521 u9521 commented Mar 13, 2026

Copy link
Copy Markdown
Contributor
  • Refactor Manager Compose screens to a unified coordinator pattern based on UiState + Actions, shared by both Material and Miuix implementations.
  • Search behavior is now debounced and unified across multiple screens.
  • App profile navigation now depends on UID-based group resolution rather than explicit package name.
  • Module update/uninstall confirmation and side effects are centralized in the module coordinator.

u9521 added 4 commits March 13, 2026 10:38
- Move preference persistence and initialization (system apps and primary user app filters) from `SuperUserScreen` to `SuperUserViewModel`.
- Introduce `initializePreferences`, `toggleShowSystemApps`, and `toggleShowOnlyPrimaryUserApps` in `SuperUserViewModel` to encapsulate state logic and `SharedPreferences` access.
- Remove `SuperUserUtils.kt` and consolidate application grouping and sorting logic.
- Simplify `SuperUserScreen` by delegating preference toggles and initialization to the ViewModel.
- Remove `Parcelable` implementation and `@Parcelize` from `GroupedApps` to simplify the data model.
- Clean up unused imports and streamline state observation in the SuperUser screen.

Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
- Remove unused imports, including `mutableIntStateOf`, `rememberSaveable`, `KernelSUApplication`, and various unused icons and service connection components.
- Clean up unnecessary XML namespaces and `tools:targetApi` attributes in manifest and theme files.
- Refactor `FilterNumber` logic to use a range check for better readability.
- Explicitly define `androidCompileNdkVersion` as a String in the build configuration.
- Simplify `ConfirmDialogVisualsImpl` instantiation by using named arguments.
- Minor cleanup of state initialization and unused variables across `InstallScreen` and `MainActivity`.

Signed-off-by: u9521 <63995396+u9521@users.noreply.github.com>
- Add `Arrangement.spacedBy(4.dp)` to the `Column` containing status tags (e.g., User ID) in the `AppProfileMaterial` list item to prevent overlapping and improve visual separation.

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

YuKongA commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

解决一下冲突吧

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

u9521 commented Mar 13, 2026

Copy link
Copy Markdown
Contributor Author

解决一下冲突吧

合好了

@KOWX712

KOWX712 commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

要顺便pick一下这三个吗,不想多开一个pr
KOWX712/KernelSU@65f8cda...e9c4695

KOWX712 and others added 4 commits March 13, 2026 16:24
idk why material so wierd
- Update `searchContent` to use `BoxScope` instead of `ColumnScope` to allow for overlaying components.
- Integrate `SnackbarHost` within the search view's content area using `LocalSnackbarHost`.
- Configure the snackbar with `imePadding` and `navigationBarsPadding` to ensure visibility above the software keyboard and system bars.
- Wrap search results and the snackbar in a `Box` to manage alignment and stacking within the expanded search interface.
@KOWX712

KOWX712 commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

现在这个 searchbar 漏了个horizontal window insets, 你看你不能加,还是晚点我写

@KOWX712

KOWX712 commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

KOWX712@e824ae0

u9521 and others added 4 commits March 13, 2026 17:58
…nature

- Update `SearchBar` component to pass `bottomPadding` to its `searchContent` lambda, ensuring correct inset handling within search results.
- Refactor `ExpandedFullScreenContainedSearchBar` to exclude bottom insets from the container and manually calculate them for the content.
- Update `ModuleMaterial`, `ModuleRepoMaterial`, and `SuperUserMaterial` to consume the new `bottomPadding` parameter in their search implementations.
- Standardize bottom padding calculation in `ModuleRepoList` to use a provided `Dp` value instead of accessing `WindowInsets` directly.
- Ensure search result lists across Module, Repo, and SuperUser screens properly account for navigation bar spacing when using the search overlay.
- Extract `SendLogBottomSheet` from `SettingsMaterial` into a standalone component in `ui.component.material`.
- Modularize log saving and sharing logic, including file provider URI generation and activity result handling.
- Improve UI consistency by using `FilledIconButton` and standardizing spacing/alignment within the bottom sheet.
- Simplify `SettingsMaterial` by replacing inline `ModalBottomSheet` logic with the new `SendLogBottomSheet` component.
- Add haptic feedback to log action buttons.
@YuKongA

YuKongA commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

还有啥要改的么

@KOWX712

KOWX712 commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

KOWX712@102d4c3

@KOWX712

KOWX712 commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

SendLogDialog 是不是没用了

@YuKongA

YuKongA commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

SendLogDialog 是不是没用了

我看看

@YuKongA

YuKongA commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

SendLogDialog 是不是没用了

已解决

@YuKongA YuKongA merged commit 09cb658 into tiann:main Mar 13, 2026
@u9521 u9521 deleted the mui-refactor branch March 13, 2026 15:07
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