Comments (3)
感谢反馈,麻烦描述下操作步骤或其他能帮助我定位问题的信息😁
from fragmject.
感谢反馈,麻烦描述下操作步骤或其他能帮助我定位问题的信息😁
首页列表进行分页查询后,点击进入详情页在返回首页,这个时候首页Fragment 重建后,ViewModel会重新请求上一次分页的页码,你首页的ArticleAdapter()是一个常量里面的list没有被清空,这个时候重复请求页码的数据就会重新添加进list里面
from fragmject.
感谢反馈,麻烦描述下操作步骤或其他能帮助我定位问题的信息😁
首页列表进行分页查询后,点击进入详情页在返回首页,这个时候首页Fragment 重建后,ViewModel会重新请求上一次分页的页码,你首页的ArticleAdapter()是一个常量里面的list没有被清空,这个时候重复请求页码的数据就会重新添加进list里面
通过你的反馈,定位到问题是由 LiveData 粘性事件导致。目前想到两种解决方案:一是视图销毁时清除 LiveData 的数据,二是使用 SingleLiveEvent 。相关代码已经更新,如果你有更好的方案欢迎一起交流😁
from fragmject.
Related Issues (17)
- 字节码插桩,我随便写了个方法,没有输出方法的执行时间? HOT 5
- 图片编辑,超长图会很模糊,原图是清晰的 HOT 1
- 图片编辑器功能,插入文字后再旋转一定角度(比如90度),这个时候就点击不到文字sticker HOT 1
- 图片编辑框架在项目中应该没有使用到吧 HOT 1
- 没人觉得app好卡吗 HOT 2
- 大佬,可以把如下方法集成到 SystemHelper中吗 HOT 2
- 大佬大佬,请教一下 WanViewModel 数据更新中的问题 HOT 1
- 运行master分支需要的as版本是什么? HOT 1
- 编译报错 HOT 1
- asm 插桩现在是失效了吗? HOT 1
- 请求另外一个url地址的数据应该怎么弄? HOT 3
- 图片编辑框架1.2.4使用异常 HOT 3
- This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer. HOT 2
- 编译报错 HOT 2
- 这里的代码是不是写错了? HOT 1
- 编译报错 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fragmject.