From 3671803f49204387e3eeb350f27748a42861bfcd Mon Sep 17 00:00:00 2001 From: Grishka Date: Sun, 13 Nov 2022 19:18:42 +0400 Subject: [PATCH] Fix #336 --- .../org/joinmastodon/android/api/MastodonAPIRequest.java | 9 ++++++--- mastodon/src/main/res/xml/locales_config.xml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mastodon/src/main/java/org/joinmastodon/android/api/MastodonAPIRequest.java b/mastodon/src/main/java/org/joinmastodon/android/api/MastodonAPIRequest.java index 0b8228834..ad9a6254e 100644 --- a/mastodon/src/main/java/org/joinmastodon/android/api/MastodonAPIRequest.java +++ b/mastodon/src/main/java/org/joinmastodon/android/api/MastodonAPIRequest.java @@ -191,15 +191,18 @@ public abstract class MastodonAPIRequest extends APIRequest{ } void onError(ErrorResponse err){ - invokeErrorCallback(err); + if(!canceled) + invokeErrorCallback(err); } void onError(String msg, int httpStatus, Throwable exception){ - invokeErrorCallback(new MastodonErrorResponse(msg, httpStatus, exception)); + if(!canceled) + invokeErrorCallback(new MastodonErrorResponse(msg, httpStatus, exception)); } void onSuccess(T resp){ - invokeSuccessCallback(resp); + if(!canceled) + invokeSuccessCallback(resp); } @Override diff --git a/mastodon/src/main/res/xml/locales_config.xml b/mastodon/src/main/res/xml/locales_config.xml index 862ddf402..7e50a26f1 100644 --- a/mastodon/src/main/res/xml/locales_config.xml +++ b/mastodon/src/main/res/xml/locales_config.xml @@ -13,7 +13,7 @@ -