hehonghui / hehonghui/AndroidEventBus
1.04版本unregister()方法的问题
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 390
- PR merge metrics
- No merged PRs in 30d
Description
我今天把AndroidEventBus升级到1.0.4,完后在处理一个fragment的时候,只要一切出这个fragment,再回来,所有的Subscriber就接收不到信息了,不切出就没事儿。
此时我是在onDestroy中调用unregister的,但我看这个方法过时,我就把它删除掉了,结果前面的问题就好了,怎么切换Fragment,也不会影响方法的调用了。
所以我想问的是,现在既然unregister过时了,以后应该用什么替代,还是就根本不用调用了?
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 reproducing the Fragment switch scenario described for AndroidEventBus 1.0.4, comparing behavior when unregister() is called from onDestroy and when it is omitted. Determine the intended subscriber lifecycle and document or test the supported replacement, with completion defined by subscribers continuing to receive events after returning to the Fragment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100