建议移除 repository 层
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 199
- PR merge metrics
- No merged PRs in 30d
Description
注意到项目中的 ShoeRepository 几乎都是直接调用 dao,没有提供其他有用的价值,不如直接在 view model 使用 dao 更加方便维护。
有些 Repository 方法 withContext 做了线程切换操作,这个在 repository 做是合理的,但是 Room 原生也已经支持 suspend 方法了。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating ShoeRepository, its DAO calls, and the view models that depend on it. Review how Room suspend methods are currently used and determine the full set of callers before deciding whether the repository layer can be removed. Done would mean the affected view models use the DAO directly without losing the existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100