Эх сурвалжийг харах

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 <dev@mhibbe.de>
Marcel Hibbe 3 жил өмнө
parent
commit
c628c23557

+ 1 - 1
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() {

+ 1 - 0
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