From ec7e27b3a3860bcfac65030bcae08a0ae16c2d74 Mon Sep 17 00:00:00 2001 From: sim Date: Sun, 19 Mar 2023 18:03:33 +0100 Subject: [PATCH] Call then() even when api call fails --- .../java/org/unifiedpush/distributor/nextpush/api/Api.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/unifiedpush/distributor/nextpush/api/Api.kt b/app/src/main/java/org/unifiedpush/distributor/nextpush/api/Api.kt index 395efda..1cd979f 100644 --- a/app/src/main/java/org/unifiedpush/distributor/nextpush/api/Api.kt +++ b/app/src/main/java/org/unifiedpush/distributor/nextpush/api/Api.kt @@ -61,6 +61,7 @@ class Api(val context: Context) { override fun onError(e: Throwable) { e.printStackTrace() + then() } override fun onComplete() { @@ -157,8 +158,9 @@ class Api(val context: Context) { } override fun onError(e: Throwable) { - block(null) e.printStackTrace() + block(null) + then() } override fun onComplete() { @@ -188,6 +190,7 @@ class Api(val context: Context) { override fun onError(e: Throwable) { e.printStackTrace() + then() } override fun onComplete() {