Blankj / RxBus

:bus: The RxBus as steady as an old dog.

Home Page:https://blankj.com/2018/05/09/awesome-rxbus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

调用 BusProvider.getBus().unregister(this); 下次再进页面 会多次接收到事件

chengmenghuiAndroid opened this issue · comments

调用 BusProvider.getBus().unregister(this); 下次再进页面 会多次接收到事件

RxBus 有你说的这个 api ?

RxBus 有你说的这个 api ?

RxBus.getDefault().unregister(object);

api之前写错了

你用的是 postSticky 吗?

你用的是 postSticky 吗?
是的

说明文档里写了

// 发送 String 类型的粘性事件
RxBus.getDefault().postSticky("without tag");

// 发送带 tag 为 "my tag" 的 String 类型的粘性事件
RxBus.getDefault().postSticky("with tag", "my tag");

// 在需要移除粘性事件的地方移除它
RxBus.getDefault().removeSticky("without tag");
RxBus.getDefault().removeSticky("with tag", "my tag");

恩恩 我再看看