refactor(fragment): 改用回调方式查询菜品列表,修复刷新卡死问题
- FoodListFragment 改用 searchFoodListWithCallback 替代 SharedFlow collect, 彻底解决下拉/上拉因数据相同导致不触发的问题 - NetViewModel 新增 searchFoodListWithCallback 回调版本 - CookingModeActivity loadFragment 改为 show/hide 方式,切换餐次不重建 Fragment - 修复数据为空时未调用 finishRefresh 导致加载动画卡死的问题 - 新增 fragment-ktx 依赖,支持 by viewModels() Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ junitVersion = "1.1.5"
|
||||
espressoCore = "3.5.1"
|
||||
appcompat = "1.6.1"
|
||||
kotlinGradlePlugin = "2.0.21"
|
||||
fragmentKtx = "1.8.6"
|
||||
lifecycleRuntimeKtx = "2.8.7"
|
||||
lifecycleViewmodelKtx = "2.8.7"
|
||||
loggingInterceptor = "4.9.1"
|
||||
@@ -36,6 +37,7 @@ flexbox = "3.0.0"
|
||||
[libraries]
|
||||
android-core = { module = "com.google.zxing:android-core", version.ref = "androidCore" }
|
||||
androidx-activity-ktx = { module = "androidx.activity:activity-ktx", version.ref = "activityKtx" }
|
||||
androidx-fragment-ktx = { module = "androidx.fragment:fragment-ktx", version.ref = "fragmentKtx" }
|
||||
androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "lifecycleViewmodelKtx" }
|
||||
androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
||||
androidx-room-ktx = { module = "androidx.room:room-ktx", version.ref = "roomRuntime" }
|
||||
|
||||
Reference in New Issue
Block a user