mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
fix to load conversations when servers status app is disabled
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
eb57411bbd
commit
7f2b337565
2 changed files with 9 additions and 5 deletions
|
@ -202,11 +202,11 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
|
|||
holder.binding.favoriteConversationImageView.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (Conversation.ConversationType.ROOM_SYSTEM != conversation.getType()) {
|
||||
if (status != null && Conversation.ConversationType.ROOM_SYSTEM != conversation.getType()) {
|
||||
float size = DisplayUtils.convertDpToPixel(STATUS_SIZE_IN_DP, appContext);
|
||||
holder.binding.userStatusImage.setImageDrawable(new StatusDrawable(
|
||||
status != null ? status.getStatus() : "",
|
||||
status != null ? status.getIcon() : "",
|
||||
status.getStatus(),
|
||||
status.getIcon(),
|
||||
size,
|
||||
context.getResources().getColor(R.color.bg_default),
|
||||
appContext));
|
||||
|
|
|
@ -472,10 +472,14 @@ public class ConversationsListController extends BaseController implements Searc
|
|||
|
||||
@SuppressLint("LongLogTag")
|
||||
public void fetchData() {
|
||||
fetchUserStatuses();
|
||||
if (CapabilitiesUtil.isUserStatusAvailable(userUtils.getCurrentUser())) {
|
||||
fetchUserStatusesAndRooms();
|
||||
} else {
|
||||
fetchRooms();
|
||||
}
|
||||
}
|
||||
|
||||
private void fetchUserStatuses() {
|
||||
private void fetchUserStatusesAndRooms() {
|
||||
ncApi.getUserStatuses(credentials, ApiUtils.getUrlForUserStatuses(currentUser.getBaseUrl()))
|
||||
.subscribe(new Observer<StatusesOverall>() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue