mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-11 14:54:09 +01:00
Add status support
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
ef8a2b68fd
commit
d5c582efb7
@ -196,14 +196,16 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
|
|||||||
case ROOM_TYPE_ONE_TO_ONE_CALL:
|
case ROOM_TYPE_ONE_TO_ONE_CALL:
|
||||||
holder.onlineIndicator.setVisibility(View.VISIBLE);
|
holder.onlineIndicator.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
if (conversation.getParticipants() == null || conversation.getParticipants().isEmpty()) {
|
if (conversation.getCount() > 0) {
|
||||||
holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_offline));
|
if (conversation.getCount() == 2 || (conversation.getCount() == 1 &&
|
||||||
} else {
|
conversation.getSessionId().equals("0"))) {
|
||||||
holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_online));
|
holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_online));
|
||||||
|
} else {
|
||||||
|
holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_offline));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
holder.onlineIndicator.setBackground(context.getDrawable(R.drawable.shape_bubble_offline));
|
||||||
}
|
}
|
||||||
|
|
||||||
//holder.moreMenuButton.setContentDescription(String.format(resources.getString(R.string
|
|
||||||
// .nc_description_more_menu_one_to_one), conversation.getDisplayName()));
|
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(conversation.getName())) {
|
if (!TextUtils.isEmpty(conversation.getName())) {
|
||||||
GlideUrl glideUrl = new GlideUrl(ApiUtils.getUrlForAvatarWithName(userEntity.getBaseUrl(),
|
GlideUrl glideUrl = new GlideUrl(ApiUtils.getUrlForAvatarWithName(userEntity.getBaseUrl(),
|
||||||
@ -226,9 +228,6 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ROOM_GROUP_CALL:
|
case ROOM_GROUP_CALL:
|
||||||
//holder.moreMenuButton.setContentDescription(String.format(resources.getString(R.string
|
|
||||||
// .nc_description_more_menu_group), conversation.getDisplayName()));
|
|
||||||
|
|
||||||
holder.onlineIndicator.setVisibility(View.GONE);
|
holder.onlineIndicator.setVisibility(View.GONE);
|
||||||
|
|
||||||
GlideApp.with(context)
|
GlideApp.with(context)
|
||||||
@ -241,8 +240,6 @@ public class ConversationItem extends AbstractFlexibleItem<ConversationItem.Conv
|
|||||||
.into(holder.dialogAvatar);
|
.into(holder.dialogAvatar);
|
||||||
break;
|
break;
|
||||||
case ROOM_PUBLIC_CALL:
|
case ROOM_PUBLIC_CALL:
|
||||||
//holder.moreMenuButton.setContentDescription(String.format(resources.getString(R.string
|
|
||||||
// .nc_description_more_menu_public), conversation.getDisplayName()));
|
|
||||||
holder.onlineIndicator.setVisibility(View.GONE);
|
holder.onlineIndicator.setVisibility(View.GONE);
|
||||||
GlideApp.with(context)
|
GlideApp.with(context)
|
||||||
.asBitmap()
|
.asBitmap()
|
||||||
|
@ -29,7 +29,7 @@ import com.nextcloud.talk.models.json.participants.Participant;
|
|||||||
|
|
||||||
import org.parceler.Parcel;
|
import org.parceler.Parcel;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.HashMap;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@ -54,9 +54,9 @@ public class Conversation {
|
|||||||
@JsonField(name = "numGuests")
|
@JsonField(name = "numGuests")
|
||||||
public long numberOfGuests;
|
public long numberOfGuests;
|
||||||
@JsonField(name = "guestList")
|
@JsonField(name = "guestList")
|
||||||
public List<Participant> guestList;
|
public HashMap<String, HashMap<String, Object>> guestList;
|
||||||
@JsonField(name = "participants")
|
@JsonField(name = "participants")
|
||||||
public List<Participant> participants;
|
public HashMap<String, HashMap<String, Object>> participants;
|
||||||
@JsonField(name = "participantType", typeConverter = EnumParticipantTypeConverter.class)
|
@JsonField(name = "participantType", typeConverter = EnumParticipantTypeConverter.class)
|
||||||
public Participant.ParticipantType participantType;
|
public Participant.ParticipantType participantType;
|
||||||
@JsonField(name = "hasPassword")
|
@JsonField(name = "hasPassword")
|
||||||
|
Loading…
Reference in New Issue
Block a user