🚀 OShin New CI Build!
Refactor(Home): Migrate Home screen to Hilt ViewModel and Repository
This commit refactors the home screen by decoupling the UI from data-fetching logic. It replaces the monolithic composable with a new Hilt-powered and , following modern Android architecture patterns.
The data-fetching logic is now centralized and cached, improving performance and maintainability.
### Key Changes:
- ViewModel-Driven UI:
- Deleted : The original home screen composable, which contained all UI, state management, and data fetching, has been removed.
- Created : A new Hilt ViewModel now manages the home screen's state (). It's responsible for fetching all data (carousel, device status, features) asynchronously.
- Created : A new, stateless composable that renders the UI based on the collected from the .
- Repository and Dependency Injection:
- Introduced : Created a new repository ( and ) to act as a single source of truth for searchable feature items. It caches the feature list after the first load to optimize performance.
- Created : A new Dagger Hilt module has been added to provide the implementation.
- Updated : The module/search screen's ViewModel now injects and uses to get the searchable item index, centralizing the logic and benefiting from the cache.
- Home Screen Feature Enhancements:
- Random Features: The home screen now displays a shuffled list of features fetched from the , providing users with discoverable functionality.
- UI Cleanup: Minor UI adjustments were made, including adding overscroll effects to lists and cleaning up some code paths.
- Code Organization:
- Home-related files (, , and data models) are now organized under the and packages.
- The file was renamed to to follow Kotlin style conventions.
重构中,普通用户无需更新
🔗 查看本次提交
Refactor(Home): Migrate Home screen to Hilt ViewModel and Repository
This commit refactors the home screen by decoupling the UI from data-fetching logic. It replaces the monolithic composable with a new Hilt-powered and , following modern Android architecture patterns.
The data-fetching logic is now centralized and cached, improving performance and maintainability.
### Key Changes:
- ViewModel-Driven UI:
- Deleted : The original home screen composable, which contained all UI, state management, and data fetching, has been removed.
- Created : A new Hilt ViewModel now manages the home screen's state (). It's responsible for fetching all data (carousel, device status, features) asynchronously.
- Created : A new, stateless composable that renders the UI based on the collected from the .
- Repository and Dependency Injection:
- Introduced : Created a new repository ( and ) to act as a single source of truth for searchable feature items. It caches the feature list after the first load to optimize performance.
- Created : A new Dagger Hilt module has been added to provide the implementation.
- Updated : The module/search screen's ViewModel now injects and uses to get the searchable item index, centralizing the logic and benefiting from the cache.
- Home Screen Feature Enhancements:
- Random Features: The home screen now displays a shuffled list of features fetched from the , providing users with discoverable functionality.
- UI Cleanup: Minor UI adjustments were made, including adding overscroll effects to lists and cleaning up some code paths.
- Code Organization:
- Home-related files (, , and data models) are now organized under the and packages.
- The file was renamed to to follow Kotlin style conventions.
重构中,普通用户无需更新
🔗 查看本次提交
GitHub
Refactor(Home): Migrate Home screen to Hilt ViewModel and Repository · suqi8/OShin@91c0a5f
This commit refactors the home screen by decoupling the UI from data-fetching logic. It replaces the monolithic `Main_Home.kt` composable with a new Hilt-powered `HomeViewModel` and `FeatureReposit...
🚀 OShin New CI Build!
Refactor(UI): Add padding parameter to component items for flexible layout
This commit introduces an parameter to all and composable components (, , , , , , etc.). This change allows for more flexible and granular control over the spacing of items within a .
The new padding is applied in before the , enabling adjustments to the outer spacing of each component row without affecting its internal layout.
Key Changes:
:
Added a new parameter.
Applied this padding to the root modifier, allowing external control over component spacing.
Component Propagation:
The parameter has been threaded through all higher-level components that build on , including , , , , , and .
:
Now dynamically calculates and applies to each item rendered within a .
Items at the start or end of a list, or single items, receive different padding values to improve visual spacing within the card.
:
The default vertical for has been changed from to , as this spacing is now managed externally by the items themselves.
:
Updated keys for to and to for consistency.
普通用户无需更新
🔗 查看本次提交
Refactor(UI): Add padding parameter to component items for flexible layout
This commit introduces an parameter to all and composable components (, , , , , , etc.). This change allows for more flexible and granular control over the spacing of items within a .
The new padding is applied in before the , enabling adjustments to the outer spacing of each component row without affecting its internal layout.
Key Changes:
:
Added a new parameter.
Applied this padding to the root modifier, allowing external control over component spacing.
Component Propagation:
The parameter has been threaded through all higher-level components that build on , including , , , , , and .
:
Now dynamically calculates and applies to each item rendered within a .
Items at the start or end of a list, or single items, receive different padding values to improve visual spacing within the card.
:
The default vertical for has been changed from to , as this spacing is now managed externally by the items themselves.
:
Updated keys for to and to for consistency.
普通用户无需更新
🔗 查看本次提交
GitHub
Refactor(UI): Add padding parameter to component items for flexible l… · suqi8/OShin@40c94fd
…ayout
This commit introduces an `externalPadding` parameter to all `fun*` and `Super*` composable components (`FunArrow`, `FunSwitch`, `FunSlider`, `FunDropdown`, `FunPicSele`, `FunString`, etc.)...
This commit introduces an `externalPadding` parameter to all `fun*` and `Super*` composable components (`FunArrow`, `FunSwitch`, `FunSlider`, `FunDropdown`, `FunPicSele`, `FunString`, etc.)...
🚀 OShin New CI Build!
Refactor: Standardize component names and clean up UI code
This commit refactors several components for consistency, cleans up unused code, and makes minor UI improvements.
The composable has been renamed to to align with Kotlin's naming conventions for composable functions. All calls have been updated accordingly. Additionally, the composable has been renamed to .
### Key Changes:
- Component Renaming:
- is now . An overloaded version that directly handles has also been added.
- is now .
- UI & Code Cleanup:
- Deleted : The Recent Update screen and its navigation entry in have been completely removed. The code was commented out and is now deleted.
- : Switched from the old (with a typo) to the new composable.
- : Corrected the call from to and wrapped the item rendering logic in a to fix layout issues where the separator line was not being displayed correctly.
- : Replaced with the extension function for consistency.
- Component Enhancements:
- : Added an optional composable parameter to allow displaying an icon or other content to the left of the title, similar to other components.
- & : Enabled the parameter to display avatars and icons in the contributor and about lists, which were previously commented out.
🔗 查看本次提交
Refactor: Standardize component names and clean up UI code
This commit refactors several components for consistency, cleans up unused code, and makes minor UI improvements.
The composable has been renamed to to align with Kotlin's naming conventions for composable functions. All calls have been updated accordingly. Additionally, the composable has been renamed to .
### Key Changes:
- Component Renaming:
- is now . An overloaded version that directly handles has also been added.
- is now .
- UI & Code Cleanup:
- Deleted : The Recent Update screen and its navigation entry in have been completely removed. The code was commented out and is now deleted.
- : Switched from the old (with a typo) to the new composable.
- : Corrected the call from to and wrapped the item rendering logic in a to fix layout issues where the separator line was not being displayed correctly.
- : Replaced with the extension function for consistency.
- Component Enhancements:
- : Added an optional composable parameter to allow displaying an icon or other content to the left of the title, similar to other components.
- & : Enabled the parameter to display avatars and icons in the contributor and about lists, which were previously commented out.
🔗 查看本次提交
GitHub
Refactor: Standardize component names and clean up UI code · suqi8/OShin@3e5bf99
This commit refactors several components for consistency, cleans up unused code, and makes minor UI improvements.
The `funSwitch` composable has been renamed to `FunSwitch` to align with Kotlin&am...
The `funSwitch` composable has been renamed to `FunSwitch` to align with Kotlin&am...
🚀 OShin New CI Build!
feat(Module): Sort module list by app name
This commit updates the module list screen to sort entries alphabetically by their application name, rather than using a hardcoded order. This improves usability and makes it easier for users to find a specific app's feature page.
To achieve this without blocking the UI, the sorting logic is performed asynchronously.
### Key Changes:
- :
- The function now initiates an asynchronous task () to fetch and sort the module entries.
- A new function has been created. It asynchronously resolves the display name for each 's package name.
- It uses to ensure correct alphabetical sorting that respects the user's locale (e.g., for Chinese characters).
- The module list is only updated in the UI state after the sorting is complete, while other tasks like building the search index continue in parallel.
🔗 查看本次提交
feat(Module): Sort module list by app name
This commit updates the module list screen to sort entries alphabetically by their application name, rather than using a hardcoded order. This improves usability and makes it easier for users to find a specific app's feature page.
To achieve this without blocking the UI, the sorting logic is performed asynchronously.
### Key Changes:
- :
- The function now initiates an asynchronous task () to fetch and sort the module entries.
- A new function has been created. It asynchronously resolves the display name for each 's package name.
- It uses to ensure correct alphabetical sorting that respects the user's locale (e.g., for Chinese characters).
- The module list is only updated in the UI state after the sorting is complete, while other tasks like building the search index continue in parallel.
🔗 查看本次提交
GitHub
feat(Module): Sort module list by app name · suqi8/OShin@b861843
This commit updates the module list screen to sort entries alphabetically by their application name, rather than using a hardcoded order. This improves usability and makes it easier for users to fi...
🚀 OShin New CI Build!
feat(InCallUI): Add feature page for call interface
This commit introduces a new feature page for the Android In-Call UI ().
The new page is built using the declarative UI model and is now registered in the , making it accessible from the main module list.
### Key Changes:
- New Feature Page ():
- A new page definition has been created for the target application .
- It includes an initial toggle to Hide Call Ringtone, allowing users to mute the ringtone via a preference switch.
- Feature Registration ():
- The page definition has been added to the registry, mapping it to its corresponding feature set.
- A new for has been added to the main list, making the page visible to users.
- Developer Template ():
- A new template file has been added to serve as a basic boilerplate for creating future feature pages, demonstrating the structure of a .
🔗 查看本次提交
feat(InCallUI): Add feature page for call interface
This commit introduces a new feature page for the Android In-Call UI ().
The new page is built using the declarative UI model and is now registered in the , making it accessible from the main module list.
### Key Changes:
- New Feature Page ():
- A new page definition has been created for the target application .
- It includes an initial toggle to Hide Call Ringtone, allowing users to mute the ringtone via a preference switch.
- Feature Registration ():
- The page definition has been added to the registry, mapping it to its corresponding feature set.
- A new for has been added to the main list, making the page visible to users.
- Developer Template ():
- A new template file has been added to serve as a basic boilerplate for creating future feature pages, demonstrating the structure of a .
🔗 查看本次提交
GitHub
feat(InCallUI): Add feature page for call interface · suqi8/OShin@a7f3faa
This commit introduces a new feature page for the Android In-Call UI (`com.android.incallui`).
The new page is built using the declarative UI model and is now registered in the `FeatureRegistry`, ...
The new page is built using the declarative UI model and is now registered in the `FeatureRegistry`, ...
🚀 OShin New CI Build!
feat(SystemUI): Add Control Center page with media cover options
This commit introduces a new Control Center feature page for the SystemUI module. The new page is built using the declarative UI model and provides options for customizing the media player in the Quick Settings panel.
### Key Changes:
- New Feature Page ():
- A new file has been created to define the UI for the Control Center screen ().
- It includes two components:
- Enlarge Media Cover: A toggle to enable or disable an enlarged media background in the QS panel.
- Auto Color Label: A conditional toggle that appears only when Enlarge Media Cover is enabled, allowing users to control the label's coloring.
- Feature Registry ():
- The new has been registered, making the page accessible within the application's navigation structure.
🔗 查看本次提交
feat(SystemUI): Add Control Center page with media cover options
This commit introduces a new Control Center feature page for the SystemUI module. The new page is built using the declarative UI model and provides options for customizing the media player in the Quick Settings panel.
### Key Changes:
- New Feature Page ():
- A new file has been created to define the UI for the Control Center screen ().
- It includes two components:
- Enlarge Media Cover: A toggle to enable or disable an enlarged media background in the QS panel.
- Auto Color Label: A conditional toggle that appears only when Enlarge Media Cover is enabled, allowing users to control the label's coloring.
- Feature Registry ():
- The new has been registered, making the page accessible within the application's navigation structure.
🔗 查看本次提交
GitHub
feat(SystemUI): Add Control Center page with media cover options · suqi8/OShin@c309a5f
This commit introduces a new "Control Center" feature page for the SystemUI module. The new page is built using the declarative UI model and provides options for customizing the m...
🚀 OShin New CI Build!
feat(SystemUI): Add Hardware Indicator feature page
This commit introduces a new, comprehensive Hardware Indicator feature page for SystemUI. It allows users to display real-time hardware information—such as power consumption, temperature, CPU/RAM usage, and more—directly in the status bar.
The implementation follows the declarative UI model, defining the entire page structure and its conditional logic in . It also refactors the data model to make UI components more flexible.
### Key Changes:
- New Feature Page ():
- Created a complete declarative UI definition for the Hardware Indicator page ().
- The page includes separate, collapsible sections for Power and Temperature indicators.
- Each indicator has its own enable/disable switch and conditionally visible settings for:
- Display Content: Single or dual-row layout, with dropdowns to select what data to show (e.g., current, voltage, CPU temp).
- Appearance: Text styling (bold), alignment, font size, and update interval.
- Adds global settings for data sources (e.g., dual-cell battery, CPU temperature/frequency source) and unit visibility toggles.
- Added new string arrays for dropdown options (, ).
- Data Model Refactoring ( & ):
- : The property was elevated from child classes into the parent interface. This allows any top-level UI block (like or ) to have its visibility controlled dynamically.
- Component: The component was promoted from a (inside a card) to a (a standalone card). This allows it to function as a top-level placeholder that appears when a feature section is disabled.
- UI Rendering Logic ():
- The rendering logic in was updated to handle the refactored model.
- Visibility checks for and are now performed at the page level before rendering, respecting their new top-level .
- Feature Registration ():
- The new has been registered with the key , making it discoverable and navigable from the main SystemUI page.
🔗 查看本次提交
feat(SystemUI): Add Hardware Indicator feature page
This commit introduces a new, comprehensive Hardware Indicator feature page for SystemUI. It allows users to display real-time hardware information—such as power consumption, temperature, CPU/RAM usage, and more—directly in the status bar.
The implementation follows the declarative UI model, defining the entire page structure and its conditional logic in . It also refactors the data model to make UI components more flexible.
### Key Changes:
- New Feature Page ():
- Created a complete declarative UI definition for the Hardware Indicator page ().
- The page includes separate, collapsible sections for Power and Temperature indicators.
- Each indicator has its own enable/disable switch and conditionally visible settings for:
- Display Content: Single or dual-row layout, with dropdowns to select what data to show (e.g., current, voltage, CPU temp).
- Appearance: Text styling (bold), alignment, font size, and update interval.
- Adds global settings for data sources (e.g., dual-cell battery, CPU temperature/frequency source) and unit visibility toggles.
- Added new string arrays for dropdown options (, ).
- Data Model Refactoring ( & ):
- : The property was elevated from child classes into the parent interface. This allows any top-level UI block (like or ) to have its visibility controlled dynamically.
- Component: The component was promoted from a (inside a card) to a (a standalone card). This allows it to function as a top-level placeholder that appears when a feature section is disabled.
- UI Rendering Logic ():
- The rendering logic in was updated to handle the refactored model.
- Visibility checks for and are now performed at the page level before rendering, respecting their new top-level .
- Feature Registration ():
- The new has been registered with the key , making it discoverable and navigable from the main SystemUI page.
🔗 查看本次提交
GitHub
feat(SystemUI): Add Hardware Indicator feature page · suqi8/OShin@84e3bbe
This commit introduces a new, comprehensive "Hardware Indicator" feature page for SystemUI. It allows users to display real-time hardware information—such as power consumption, te...
🚀 OShin New CI Build!
feat(SystemUI): Add Status Bar Clock and Network Speed pages
This commit introduces two new feature pages, Status Bar Clock and Network Speed Indicator, and refactors the conditional logic model to support more complex visibility rules.
### Key Changes:
- New Feature Page: Status Bar Clock ()
- Adds a comprehensive settings page for the status bar clock.
- Includes a master toggle, size and update speed controls, and margin adjustments.
- Provides two distinct styles:
- Preset: Allows toggling elements like year, month, day, week, seconds, and AM/PM.
- Geek: Enables users to define a custom time format using patterns, with a link to documentation.
- Uses to conditionally display settings based on the selected style.
- New Feature Page: Network Speed Indicator ()
- Adds a new page to customize the network speed indicator.
- Features a master switch and settings for different styles (Default vs. Upload/Download Separation).
- Includes options for font size, hiding on low speed, icon indicators, and swapping upload/download positions.
- Leverages for showing/hiding style-specific settings.
- Refactored Conditional Logic (, )
- -> : Renamed to and introduced a .
- Added : A new data class allows combining multiple s, enabling UI elements to be displayed only when all nested conditions are met.
- Updated : The logic in has been updated to recursively evaluate and correctly process both simple and complex visibility rules.
- New UI Component: (, )
- A new screen item has been created to render a navigational arrow that opens a web URL in an external browser. This is used in the new Clock page to link to time format documentation.
- Feature Registry ()
- Registered the new and page definitions, making them accessible from the SystemUI feature page.
- Resources ()
- Added new string arrays for the options in the clock style, network speed style, and icon indicator dropdowns.
🔗 查看本次提交
feat(SystemUI): Add Status Bar Clock and Network Speed pages
This commit introduces two new feature pages, Status Bar Clock and Network Speed Indicator, and refactors the conditional logic model to support more complex visibility rules.
### Key Changes:
- New Feature Page: Status Bar Clock ()
- Adds a comprehensive settings page for the status bar clock.
- Includes a master toggle, size and update speed controls, and margin adjustments.
- Provides two distinct styles:
- Preset: Allows toggling elements like year, month, day, week, seconds, and AM/PM.
- Geek: Enables users to define a custom time format using patterns, with a link to documentation.
- Uses to conditionally display settings based on the selected style.
- New Feature Page: Network Speed Indicator ()
- Adds a new page to customize the network speed indicator.
- Features a master switch and settings for different styles (Default vs. Upload/Download Separation).
- Includes options for font size, hiding on low speed, icon indicators, and swapping upload/download positions.
- Leverages for showing/hiding style-specific settings.
- Refactored Conditional Logic (, )
- -> : Renamed to and introduced a .
- Added : A new data class allows combining multiple s, enabling UI elements to be displayed only when all nested conditions are met.
- Updated : The logic in has been updated to recursively evaluate and correctly process both simple and complex visibility rules.
- New UI Component: (, )
- A new screen item has been created to render a navigational arrow that opens a web URL in an external browser. This is used in the new Clock page to link to time format documentation.
- Feature Registry ()
- Registered the new and page definitions, making them accessible from the SystemUI feature page.
- Resources ()
- Added new string arrays for the options in the clock style, network speed style, and icon indicator dropdowns.
🔗 查看本次提交
GitHub
feat(SystemUI): Add Status Bar Clock and Network Speed pages · suqi8/OShin@a748dd6
This commit introduces two new feature pages, "Status Bar Clock" and "Network Speed Indicator," and refactors the conditional logic model to support more complex...
🚀 OShin New CI Build!
feat(Settings): Add Settings page and AppSelection component
This commit introduces a new feature page for the Settings app () and adds a new component to the declarative UI model. This new component allows users to select multiple applications, which are then stored as a comma-separated string in preferences.
### Key Changes:
- New Settings Feature Page ():
- A new declarative UI page for has been created and registered.
- It includes options to customize the display model, modify the OTA update card background, and force-show the NFC security chip.
- It also adds a complex set of toggles to manage accessibility service authorization behavior (grant, direct jump, or smart authorization) with conditional visibility.
- New Component:
- : A new data class was added to the declarative UI model.
- : The composable can now render the item using a new component.
- : The ViewModel now handles loading and saving the state for , converting the of package names to and from a comma-separated for storage in .
- Component and UI Enhancements:
- : Now requests external storage permissions on launch to ensure it can access and save image files.
- : Adjusted the width of grid items in the module list for better layout and centered the items horizontally.
- Minor Refactoring:
- The action to navigate to the Status Bar Icon settings has been temporarily commented out in the definition.
🔗 查看本次提交
feat(Settings): Add Settings page and AppSelection component
This commit introduces a new feature page for the Settings app () and adds a new component to the declarative UI model. This new component allows users to select multiple applications, which are then stored as a comma-separated string in preferences.
### Key Changes:
- New Settings Feature Page ():
- A new declarative UI page for has been created and registered.
- It includes options to customize the display model, modify the OTA update card background, and force-show the NFC security chip.
- It also adds a complex set of toggles to manage accessibility service authorization behavior (grant, direct jump, or smart authorization) with conditional visibility.
- New Component:
- : A new data class was added to the declarative UI model.
- : The composable can now render the item using a new component.
- : The ViewModel now handles loading and saving the state for , converting the of package names to and from a comma-separated for storage in .
- Component and UI Enhancements:
- : Now requests external storage permissions on launch to ensure it can access and save image files.
- : Adjusted the width of grid items in the module list for better layout and centered the items horizontally.
- Minor Refactoring:
- The action to navigate to the Status Bar Icon settings has been temporarily commented out in the definition.
🔗 查看本次提交
GitHub
feat(Settings): Add Settings page and AppSelection component · suqi8/OShin@2835a09
This commit introduces a new feature page for the "Settings" app (`com.android.settings`) and adds a new `AppSelection` component to the declarative UI model. This new component a...