OShin | O神「自动构建 CI Build」
1.55K subscribers
2 photos
1 video
783 files
692 links
OPPO/OneOlus 系统辅助应用

Channel/频道
@OPatchA
Chat/聊天
@OPatchB
Download Telegram
🚀 OShin New CI Build!

Refactor(UI): Improve BottomTabs state management

This commit refactors the composable to use unidirectional data flow for its .

Key Changes:
- **:**
- Changed to .
- callback is now mandatory to report selection changes to the caller.
- is used to animate the indicator offset when changes externally (and not during drag).
- When a tab is tapped, is called to notify the parent.
- When dragging ends, is called.
- The random background color for the selected tab item is now remembered based on to avoid changing color during recompositions caused by other state changes.
- **:**
- Updated call to pass directly as and provide an lambda.

This change makes the component more aligned with Compose's state management best practices by receiving its selected state as an input and notifying changes via a callback, rather than managing a mutable state internally.

🔗 查看本次提交
🚀 OShin New CI Build!

feat(LiquidGlass): 添加阴影效果并更新默认高光样式

本次提交为 组件引入了阴影效果,并修改了默认的高光样式,使其视觉表现更加丰富和柔和。

---

### 🚀 主要变更

#### 1. 阴影支持 ( & )
- 新增了数据类 用于定义阴影的各个属性:
- : 类型 (默认 )
- : 类型 (默认 )
- 在 中添加了新的 属性,允许为每个 元素配置阴影。
- 渲染节点 现在会读取这些样式,并将其应用于图形层以高效地绘制阴影。

#### 2. 🎨 高光样式更新 ()
- 默认高光效果已调整,以获得更好的视觉融合效果:
- 针对 和 :
- 默认 从 变更为 。
- 默认 从 变更为 。

#### 3. ⚙️ 工作流 ()
> 格式微调:移除了工作流通知消息中 周围多余的反引号,以修正 CI 的输出格式。
🔗 查看本次提交
🚀 OShin New CI Build!

Refactor(UI): Update Card color parameter and CPU Freq UI

This commit updates the library to version .
It also refactors the usage of the composable across multiple files to use the new parameter instead of the deprecated parameter.

Additionally, the CPU Frequency () screen has been updated:
- Replaced Haze blur effect with for the TopAppBar and icon buttons (Back).
- Improved the logic for fetching CPU frequencies by using and for concurrent operations.
- Pull-to-refresh mechanism is now triggered by changes in an state variable rather than directly observing .
- Cleaned up some unused imports and simplified state management.

Key changes:
- : Updated version to .
- Various UI files:
- Changed to in:
-
-
-
-
-
-
-
- :
- Removed Haze library dependencies and usage.
- Implemented for the TopAppBar background and back button.
- now uses and to fetch frequencies for each core concurrently.
- Refresh logic now relies on an .
- Removed unused , , and related blur configurations.
- Back button is now a with and modifiers instead of .
- :
- Removed preference check as is now used for background effects.
- TopAppBar color is set to to allow to show through.
🔗 查看本次提交
🚀 OShin New CI Build!

Refactor(FunSwich): Improve interaction and decouple switch visual

This commit refactors the component and its underlying and visual components.

Key Changes:

- :
- Replaced with a local implementation.
- Refactor:
- The entire (row) is now the clickable area to toggle the switch.
- The handler in now manages calling with the new state.
- The visual component is now purely presentational and receives its state from . It no longer handles any direct user interaction (clicks or drags).
- helper composable was introduced to manage the layout of right-side actions alongside the visual .
- New Composable (Visual Only):
- A new, simplified composable is introduced.
- It's a purely visual component; its appearance (thumb position, track color) is determined solely by the and parameters passed to it.
- All interaction modifiers (, ) have been removed.
- Uses and for smooth transitions based on the state.
- and :
- now uses to determine dark/light mode for track colors, falling back to if mode is auto.
- (moved from and adapted):
- This component, previously part of , is now part of 's local implementation.
- The parameter is now directly used by its modifier to handle interactions for the entire component.
- Vertical padding in changed from to .
- and (moved from ):
- These supporting objects/classes are also moved to .

- :
- Removed and as they are now co-located with the implementation in .

This refactoring centralizes the interaction logic within (via ), making the visual component simpler and purely presentational. It also improves the user experience by making the entire row of tappable to toggle its state.
🔗 查看本次提交
🚀 OShin New CI Build!

Fix\(CI\): Correctly escape hyphen in commit message for Telegram

The `sed` command in the `android\.yml` workflow was updated to correctly escape the hyphen \(`\-`\) character\. Previously, it was missing from the set of characters to be escaped, which could lead to formatting issues when sending commit messages to Telegram\.

The character class in the `sed` substitution command was changed from `[\]\\[_*\(\)\~`\>\#\+\\\-\=\|\{\}\.\!\]` to `[\]\\[_*\(\)\~`\>\#\+\=\|\{\}\.\!\-` to include the hyphen\.

🔗 查看本次提交
🚀 OShin New CI Build!

feat(Refactor): 全面重构 FunSwich 与 Card 组件以提升交互和可维护性

本次提交对 及其依赖的组件进行了深度重构,并引入了本地化的 组件,旨在统一UI、简化代码并改善用户交互。

## 核心变更

### 1. 交互与视觉解耦
- 本地化 : 移除了对 的外部依赖,替换为一个更符合当前需求的本地实现。
- 改进交互逻辑:
- 将整个 (即列表行) 作为可点击区域来切换开关状态,提升了用户操作的便捷性。
- 交互逻辑()被上移至 层面进行统一管理。
- 纯展示性 :
- 内部的 组件被重构为一个纯粹的视觉组件,其外观完全由外部传入的 和 状态驱动。
- 移除了所有手势交互修饰符(如 , ),使其职责更单一。
- 使用 和 实现平滑的开关状态过渡动画。

### 2. 组件本地化与样式统一
- 引入本地 : 新增了项目内的 Composable,替换了所有对外部库 的调用。
- 简化调用: 新的 组件内置了默认的 (如 和标准化的 ),极大地简化了应用内各个调用点的代码,并确保了卡片样式的一致性。

### 3. 模块化
- 文件迁移: 将原先位于 内的 及其附属的 和 类,迁移到独立的 文件中。
- 代码复用: 此举增强了 的模块化和复用性。
- 样式微调: 将 的垂直内边距从 调整为 ,使布局更紧凑。

### 4. 代码清理
- 移除冗余代码: 从 中删除了已迁移的 相关代码。
- 简化 : Composable 的实现被简化,统一了其内边距。
🔗 查看本次提交
🚀 OShin New CI Build!

Refactor(UI): Replace SuperArrow with FunArrow

This commit replaces all instances of with a new composable.

Key Changes:

- New :
- Created which internally uses .
- now handles navigation via an optional parameter and . If is provided, it navigates to that route before executing the lambda.
- Added a drawable for the arrow icon, which is used by the underlying .

- UI Updates:
-
-
-
-
-
-
-
- (including renamed to )
-
-
-
-
-
-
- All instances of were replaced with .

This refactoring centralizes the arrow component logic within and standardizes its usage across the application, particularly for navigation-related actions.
🔗 查看本次提交
🚀 OShin New CI Build!

Refactor(UI): Update FunArrow component signature

- Changed parameter in to be optional (nullable).
- Changed parameter in to be optional (nullable).

This makes the component more flexible by not strictly requiring a or a for its usage.
🔗 查看本次提交
🚀 OShin New CI Build!

Refactor(UI): Improve text alignment in FunListItem

This commit refactors the composable to enhance the vertical alignment of its and text.

Key Changes:
- :
- Wrapped the composables for and within layouts.
- Applied to these es to ensure a minimum height (21.14.dp for title, 18.57.dp for summary).
- Set for the es to vertically center the within the specified minimum height.

This change aims to provide more consistent and visually appealing vertical positioning of the text elements, especially when only one of the title or summary is present.
🔗 查看本次提交
🚀 OShin New CI Build!

Refactor(FunSwich): Enhance Switch component with animations and improved structure

This commit significantly refactors the and related components.

Key Changes:

- :
- Component Overhaul:
- The core visual component is now purely presentational, driven entirely by its state and does not handle interaction events.
- Implemented a sticky stretch animation for the thumb:
- The thumb width animates (stretches and then shrinks) during the transition between checked and unchecked states.
- The thumb offset animation is coordinated with the width animation to create a more dynamic and engaging visual effect.
- is used to manage these animations.
- Added a subtle shadow to the thumb using for better visual depth and anti-aliasing.
- Track and thumb sizes are now more clearly defined.
- Animation duration for all transitions (thumb offset, width, colors) is standardized.
- Component:
- This component now acts as an intermediate layer that wraps the purely visual and integrates it with a (a row-like layout).
- The entire row is clickable to toggle the state, delegating the actual state change to the callback.
- Renamed internal composable to for clarity.
- Component (Top-Level):
- Remains the top-level composable responsible for state persistence using YukiHookAPI .
- Passes down the persisted state and callbacks to .
- :
- Parameter names clarified for better understanding of light/dark mode and checked/unchecked states.
- KDoc Documentation:
- Added and improved KDoc for all components (, , , , ) to better explain their purpose, parameters, and relationships.
- Clarified the separation of concerns: for data, for layout integration and unified click handling, and for pure visual representation and animation.

This refactoring aims to create a more robust, visually appealing, and well-structured Switch implementation with clearer separation of concerns and improved animations.
🔗 查看本次提交