Skip to content

Commit c91bd1f

Browse files
committed
Post all events sticky
- This makes it possible to collect events which were posted between onPause and onStart
1 parent 08546a5 commit c91bd1f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

library/src/main/java/com/proxerme/library/connection/ProxerConnection.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,16 @@ public void run() {
219219
JSONObject json = response.asJsonObject();
220220

221221
if (json == null) {
222-
EventBus.getDefault().post(createErrorEvent(new ProxerException(UNKNOWN)));
222+
EventBus.getDefault().postSticky(createErrorEvent(new ProxerException(UNKNOWN)));
223223
} else {
224224
final E result = createEvent(parse(json));
225225

226-
EventBus.getDefault().post(result);
226+
EventBus.getDefault().postSticky(result);
227227
}
228228
} catch (final JSONException e) {
229-
EventBus.getDefault().post(createErrorEvent(ErrorHandler.handleException(e)));
229+
EventBus.getDefault().postSticky(createErrorEvent(ErrorHandler.handleException(e)));
230230
} catch (final BridgeException e) {
231-
EventBus.getDefault().post(createErrorEvent(ErrorHandler.handleException(e)));
231+
EventBus.getDefault().postSticky(createErrorEvent(ErrorHandler.handleException(e)));
232232
}
233233

234234
parseThreads.remove(getThread());
@@ -239,7 +239,7 @@ public void run() {
239239
parseThread.start();
240240
} else {
241241
if (exception.reason() != BridgeException.REASON_REQUEST_CANCELLED) {
242-
EventBus.getDefault().post(createErrorEvent(ErrorHandler.handleException(exception)));
242+
EventBus.getDefault().postSticky(createErrorEvent(ErrorHandler.handleException(exception)));
243243
}
244244
}
245245
}

0 commit comments

Comments
 (0)