Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manager: optimize theme settings #463

Closed
wants to merge 3 commits into from
Closed

Conversation

BinTianqi
Copy link
Contributor

@BinTianqi BinTianqi commented May 22, 2024

  • 使用androidx的compose-navigation代替compose-destination库作为导航方式
  • 创建uiViewModel类,使用MutableState保存主题相关状态,在APatchTheme()中使用这些状态判断使用的主题
  • 在修改主题时修改uiViewModel中的状态,避免recreate()
  • 简化了主题选择器的代码,重复的部分使用items()代替item()

@pomelohan
Copy link
Collaborator

实际上,

使用androidx的compose-navigation代替compose-destination库作为导航方式

这个我不是很想切,但这个 PR 有很多不错的想法,暂时保留,等后期我有空了整理后再合并,感谢贡献🌹

@marat2509 marat2509 added the enhancement New feature or request label May 22, 2024
@BinTianqi
Copy link
Contributor Author

BinTianqi commented May 22, 2024

我还是再研究一下怎么在不改导航方式的情况下优化主题设置吧😭

去这里 -> #466

@BinTianqi BinTianqi closed this May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants