theme contacts selector icon

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2022-07-26 23:45:04 +02:00
parent d1a562cf80
commit 9be4358ae0
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
2 changed files with 8 additions and 2 deletions

View file

@ -35,6 +35,7 @@ import com.nextcloud.talk.application.NextcloudTalkApplication;
import com.nextcloud.talk.data.user.model.User; import com.nextcloud.talk.data.user.model.User;
import com.nextcloud.talk.databinding.RvItemContactBinding; import com.nextcloud.talk.databinding.RvItemContactBinding;
import com.nextcloud.talk.models.json.participants.Participant; import com.nextcloud.talk.models.json.participants.Participant;
import com.nextcloud.talk.ui.theme.ViewThemeUtils;
import com.nextcloud.talk.utils.ApiUtils; import com.nextcloud.talk.utils.ApiUtils;
import com.nextcloud.talk.utils.DisplayUtils; import com.nextcloud.talk.utils.DisplayUtils;
@ -59,14 +60,17 @@ public class ContactItem extends AbstractFlexibleItem<ContactItem.ContactItemVie
private final Participant participant; private final Participant participant;
private final User user; private final User user;
private GenericTextHeaderItem header; private GenericTextHeaderItem header;
private final ViewThemeUtils viewThemeUtils;
public boolean isOnline = true; public boolean isOnline = true;
public ContactItem(Participant participant, public ContactItem(Participant participant,
User user, User user,
GenericTextHeaderItem genericTextHeaderItem) { GenericTextHeaderItem genericTextHeaderItem,
ViewThemeUtils viewThemeUtils) {
this.participant = participant; this.participant = participant;
this.user = user; this.user = user;
this.header = genericTextHeaderItem; this.header = genericTextHeaderItem;
this.viewThemeUtils = viewThemeUtils;
} }
@Override @Override
@ -108,6 +112,7 @@ public class ContactItem extends AbstractFlexibleItem<ContactItem.ContactItemVie
holder.binding.avatarDraweeView.setController(null); holder.binding.avatarDraweeView.setController(null);
if (participant.getSelected()) { if (participant.getSelected()) {
viewThemeUtils.colorImageView(holder.binding.checkedImageView);
holder.binding.checkedImageView.setVisibility(View.VISIBLE); holder.binding.checkedImageView.setVisibility(View.VISIBLE);
} else { } else {
holder.binding.checkedImageView.setVisibility(View.GONE); holder.binding.checkedImageView.setVisibility(View.GONE);

View file

@ -502,7 +502,8 @@ class ContactsController(args: Bundle) :
val newContactItem = ContactItem( val newContactItem = ContactItem(
participant, participant,
currentUser, currentUser,
userHeaderItems[headerTitle] userHeaderItems[headerTitle],
viewThemeUtils
) )
if (!contactItems!!.contains(newContactItem)) { if (!contactItems!!.contains(newContactItem)) {
newUserItemList.add(newContactItem) newUserItemList.add(newContactItem)