还是会发生数据倒灌
zhaoxiuyu opened this issue · comments
zhaoxiuyu commented
VoicePtaView 是自定义 ConstraintLayout,里面包含多个Fragment。
当VoicePtaView 多次被 removeVIew 并 addVIew时, 就会发生数据倒灌,收到多次回调。
Fragment中
val viewModel by activityViewModels()
初始化
val mTTSLiveData: MutableResult<BaseResponse<List>> =
MutableResult.Builder<BaseResponse<List>>().setAllowNullValue(true).create()
/// 订阅
viewModel.mTTSCloneListDataLiveData.observe(viewLifecycleOwner){}
KunMinX commented
根据你提供的信息,暂无法判断具体造成旧数据回推的原因。可以试试 MVI-Dispatcher 组件来做消息分发。
zhaoxiuyu commented