From c628c23557459cdc4614fbce37fdc2d3757ffafa Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Fri, 10 Jun 2022 15:02:58 +0200 Subject: [PATCH] fix to load conversation list (restricted user status) when the user status app on server is restricted to only some groups, the capabilities for users that are excluded still contains the "user_status" capability. For the android talk app, this caused that the conversations were not shown. With this fix, the conversations will be loaded also if the "user_status" is mistakenly set. Additionally, the option to set the status will be hidden. Signed-off-by: Marcel Hibbe --- .../nextcloud/talk/controllers/ConversationsListController.java | 2 +- .../nextcloud/talk/ui/dialog/ChooseAccountDialogFragment.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java index 0445fe100..a340b9e47 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java @@ -543,13 +543,13 @@ public class ConversationsListController extends BaseController implements Flexi @Override public void onError(@io.reactivex.annotations.NonNull Throwable e) { Log.e(TAG, "failed to fetch user statuses", e); + fetchRooms(); } @Override public void onComplete() { } }); - } private void fetchRooms() { diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/ChooseAccountDialogFragment.java b/app/src/main/java/com/nextcloud/talk/ui/dialog/ChooseAccountDialogFragment.java index 11eb21ec4..c9ccabb14 100644 --- a/app/src/main/java/com/nextcloud/talk/ui/dialog/ChooseAccountDialogFragment.java +++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/ChooseAccountDialogFragment.java @@ -233,6 +233,7 @@ public class ChooseAccountDialogFragment extends DialogFragment { @Override public void onError(@NonNull Throwable e) { Log.e(TAG, "Can't receive user status from server. ", e); + binding.statusView.setVisibility(View.GONE); } @Override