show offline contacts as grayed out in conference details
This commit is contained in:
parent
fa70bd7536
commit
2bb7bc1455
|
@ -2,10 +2,8 @@ package eu.siacs.conversations.ui;
|
||||||
|
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.app.PendingIntent;
|
import android.app.PendingIntent;
|
||||||
import android.content.ActivityNotFoundException;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
|
||||||
import android.content.IntentSender.SendIntentException;
|
import android.content.IntentSender.SendIntentException;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
|
@ -44,6 +42,9 @@ import eu.siacs.conversations.xmpp.jid.Jid;
|
||||||
|
|
||||||
public class ConferenceDetailsActivity extends XmppActivity implements OnConversationUpdate, OnMucRosterUpdate, XmppConnectionService.OnAffiliationChanged, XmppConnectionService.OnRoleChanged, XmppConnectionService.OnConferenceOptionsPushed {
|
public class ConferenceDetailsActivity extends XmppActivity implements OnConversationUpdate, OnMucRosterUpdate, XmppConnectionService.OnAffiliationChanged, XmppConnectionService.OnRoleChanged, XmppConnectionService.OnConferenceOptionsPushed {
|
||||||
public static final String ACTION_VIEW_MUC = "view_muc";
|
public static final String ACTION_VIEW_MUC = "view_muc";
|
||||||
|
|
||||||
|
private static final float INACTIVE_ALPHA = 0.4684f; //compromise between dark and light theme
|
||||||
|
|
||||||
private Conversation mConversation;
|
private Conversation mConversation;
|
||||||
private OnClickListener inviteListener = new OnClickListener() {
|
private OnClickListener inviteListener = new OnClickListener() {
|
||||||
|
|
||||||
|
@ -621,6 +622,12 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
|
||||||
}
|
}
|
||||||
ImageView iv = (ImageView) view.findViewById(R.id.contact_photo);
|
ImageView iv = (ImageView) view.findViewById(R.id.contact_photo);
|
||||||
iv.setImageBitmap(avatarService().get(user, getPixel(48), false));
|
iv.setImageBitmap(avatarService().get(user, getPixel(48), false));
|
||||||
|
if (user.getRole() == MucOptions.Role.NONE) {
|
||||||
|
tvDisplayName.setAlpha(INACTIVE_ALPHA);
|
||||||
|
tvKey.setAlpha(INACTIVE_ALPHA);
|
||||||
|
tvStatus.setAlpha(INACTIVE_ALPHA);
|
||||||
|
iv.setAlpha(INACTIVE_ALPHA);
|
||||||
|
}
|
||||||
membersView.addView(view);
|
membersView.addView(view);
|
||||||
if (mConversation.getMucOptions().canInvite()) {
|
if (mConversation.getMucOptions().canInvite()) {
|
||||||
mInviteButton.setVisibility(View.VISIBLE);
|
mInviteButton.setVisibility(View.VISIBLE);
|
||||||
|
|
Loading…
Reference in New Issue