Skip to content

Commit b6d525c

Browse files
committed
Update Readme to reflect new feature
1 parent f50cd26 commit b6d525c

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ The `ProxerConnection` class provides static methods to retrieve Java representa
3030

3131
#### The `execute()` method
3232

33-
The request will automatically happen on a worker thread, thus not blocking the UI. You will mostly use this. The result is delivered through the [EventBus library] (https://github.com/greenrobot/EventBus). Each type of a result has an event, either a normal `IEvent` or an `ErrorEvent`.
33+
The request will automatically happen on a worker thread, thus not blocking the UI. You will mostly use this. The result is delivered through the [EventBus library] (https://github.com/greenrobot/EventBus). Each type of a result has an event, either a normal `IEvent` or an `ErrorEvent`. Note: All events are postet sticky to make it possible to cache them also in the gab between `onStop()` and `onStart()` in which your class is not registred. You are responsible for cleaning sticky events once you don't need them anymore
3434
A simple query for the news might look like this:
3535

3636
```java
3737
@Override
3838
public void onStart() {
3939
super.onStart();
4040

41-
EventBus.getDefault().register(this);
41+
EventBus.getDefault().registerSticky(this);
4242
}
4343

4444
@Override
@@ -53,6 +53,9 @@ public void loadNews(int page){
5353
}
5454

5555
public void onEventMainThread(NewsEvent result) {
56+
//Remove sticky event as it is not needed anymore
57+
EventBus.getDefault().removeStickyEvent(result);
58+
5659
//Update UI
5760
}
5861
```

library/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ dependencies {
2121
compile 'de.greenrobot:eventbus:2.4.0'
2222
}
2323

24-
2524
task sourcesJar(type: Jar) {
2625
from android.sourceSets.main.java.srcDirs
2726
classifier = 'sources'

0 commit comments

Comments
 (0)