mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Removed visibility indicators from private group member list.
This commit is contained in:
@@ -36,7 +36,6 @@ class MemberListAdapter extends
|
|||||||
@Override
|
@Override
|
||||||
public boolean areContentsTheSame(MemberListItem m1, MemberListItem m2) {
|
public boolean areContentsTheSame(MemberListItem m1, MemberListItem m2) {
|
||||||
if (m1.isOnline() != m2.isOnline()) return false;
|
if (m1.isOnline() != m2.isOnline()) return false;
|
||||||
if (m1.getVisibility() != m2.getVisibility()) return false;
|
|
||||||
if (m1.getContactId() != m2.getContactId()) return false;
|
if (m1.getContactId() != m2.getContactId()) return false;
|
||||||
if (m1.getStatus() != m2.getStatus()) return false;
|
if (m1.getStatus() != m2.getStatus()) return false;
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import org.briarproject.bramble.api.identity.Author;
|
|||||||
import org.briarproject.bramble.api.identity.Author.Status;
|
import org.briarproject.bramble.api.identity.Author.Status;
|
||||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||||
import org.briarproject.briar.api.privategroup.GroupMember;
|
import org.briarproject.briar.api.privategroup.GroupMember;
|
||||||
import org.briarproject.briar.api.privategroup.Visibility;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.annotation.concurrent.NotThreadSafe;
|
import javax.annotation.concurrent.NotThreadSafe;
|
||||||
@@ -39,10 +38,6 @@ class MemberListItem {
|
|||||||
return groupMember.getContactId();
|
return groupMember.getContactId();
|
||||||
}
|
}
|
||||||
|
|
||||||
Visibility getVisibility() {
|
|
||||||
return groupMember.getVisibility();
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isOnline() {
|
boolean isOnline() {
|
||||||
return online;
|
return online;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ import org.briarproject.briar.R;
|
|||||||
import org.briarproject.briar.android.view.AuthorView;
|
import org.briarproject.briar.android.view.AuthorView;
|
||||||
|
|
||||||
import static org.briarproject.bramble.api.identity.Author.Status.OURSELVES;
|
import static org.briarproject.bramble.api.identity.Author.Status.OURSELVES;
|
||||||
import static org.briarproject.bramble.api.identity.Author.Status.UNKNOWN;
|
|
||||||
import static org.briarproject.briar.android.privategroup.VisibilityHelper.getVisibilityIcon;
|
|
||||||
import static org.briarproject.briar.android.privategroup.VisibilityHelper.getVisibilityString;
|
|
||||||
|
|
||||||
@UiThread
|
@UiThread
|
||||||
@NotNullByDefault
|
@NotNullByDefault
|
||||||
@@ -22,16 +19,12 @@ class MemberListItemHolder extends RecyclerView.ViewHolder {
|
|||||||
private final AuthorView author;
|
private final AuthorView author;
|
||||||
private final ImageView bulb;
|
private final ImageView bulb;
|
||||||
private final TextView creator;
|
private final TextView creator;
|
||||||
private final ImageView icon;
|
|
||||||
private final TextView info;
|
|
||||||
|
|
||||||
MemberListItemHolder(View v) {
|
MemberListItemHolder(View v) {
|
||||||
super(v);
|
super(v);
|
||||||
author = (AuthorView) v.findViewById(R.id.authorView);
|
author = (AuthorView) v.findViewById(R.id.authorView);
|
||||||
bulb = (ImageView) v.findViewById(R.id.bulbView);
|
bulb = (ImageView) v.findViewById(R.id.bulbView);
|
||||||
creator = (TextView) v.findViewById(R.id.creatorView);
|
creator = (TextView) v.findViewById(R.id.creatorView);
|
||||||
icon = (ImageView) v.findViewById(R.id.icon);
|
|
||||||
info = (TextView) v.findViewById(R.id.info);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void bind(MemberListItem item) {
|
protected void bind(MemberListItem item) {
|
||||||
@@ -64,19 +57,6 @@ class MemberListItemHolder extends RecyclerView.ViewHolder {
|
|||||||
} else {
|
} else {
|
||||||
creator.setVisibility(View.GONE);
|
creator.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// visibility information
|
|
||||||
if (item.getStatus() == OURSELVES || item.getStatus() == UNKNOWN) {
|
|
||||||
icon.setVisibility(View.GONE);
|
|
||||||
info.setVisibility(View.GONE);
|
|
||||||
} else {
|
|
||||||
icon.setVisibility(View.VISIBLE);
|
|
||||||
icon.setImageResource(getVisibilityIcon(item.getVisibility()));
|
|
||||||
info.setVisibility(View.VISIBLE);
|
|
||||||
info.setText(
|
|
||||||
getVisibilityString(info.getContext(), item.getVisibility(),
|
|
||||||
item.getMember().getName()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,11 +13,13 @@
|
|||||||
android:id="@+id/authorView"
|
android:id="@+id/authorView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentStart="true"
|
||||||
android:layout_alignParentLeft="true"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_alignParentTop="true"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginBottom="@dimen/margin_small"
|
android:layout_marginBottom="@dimen/margin_small"
|
||||||
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
|
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
|
||||||
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
||||||
|
android:layout_toStartOf="@+id/bulbView"
|
||||||
android:layout_toLeftOf="@+id/bulbView"
|
android:layout_toLeftOf="@+id/bulbView"
|
||||||
app:persona="list"/>
|
app:persona="list"/>
|
||||||
|
|
||||||
@@ -29,6 +31,7 @@
|
|||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignTop="@+id/authorView"
|
android:layout_alignTop="@+id/authorView"
|
||||||
|
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
|
||||||
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
||||||
tools:src="@drawable/contact_connected"/>
|
tools:src="@drawable/contact_connected"/>
|
||||||
|
|
||||||
@@ -39,40 +42,16 @@
|
|||||||
android:layout_below="@+id/authorView"
|
android:layout_below="@+id/authorView"
|
||||||
android:layout_marginBottom="@dimen/margin_small"
|
android:layout_marginBottom="@dimen/margin_small"
|
||||||
android:layout_marginLeft="@dimen/listitem_group_member_indentation"
|
android:layout_marginLeft="@dimen/listitem_group_member_indentation"
|
||||||
|
android:layout_marginStart="@dimen/listitem_group_member_indentation"
|
||||||
android:text="@string/groups_member_created_you"
|
android:text="@string/groups_member_created_you"
|
||||||
android:textColor="@color/briar_text_secondary"
|
android:textColor="@color/briar_text_secondary"
|
||||||
tools:visibility="visible"/>
|
tools:visibility="visible"/>
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/icon"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/creatorView"
|
|
||||||
android:layout_marginLeft="@dimen/listitem_group_member_indentation"
|
|
||||||
android:layout_marginRight="@dimen/margin_small"
|
|
||||||
android:contentDescription="@string/forum_invitation_already_sharing"
|
|
||||||
android:src="@drawable/ic_visibility"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/info"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_below="@+id/creatorView"
|
|
||||||
android:layout_marginEnd="@dimen/listitem_horizontal_margin"
|
|
||||||
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
|
||||||
android:layout_toRightOf="@+id/icon"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:minHeight="24dp"
|
|
||||||
android:textColor="@color/briar_text_secondary"
|
|
||||||
android:textIsSelectable="true"
|
|
||||||
android:textSize="@dimen/text_size_tiny"
|
|
||||||
android:textStyle="italic"
|
|
||||||
tools:text="@string/groups_reveal_visible_revealed_by_us"/>
|
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/divider"
|
android:id="@+id/divider"
|
||||||
style="@style/Divider.ContactList"
|
style="@style/Divider.ContactList"
|
||||||
android:layout_below="@+id/info"
|
android:layout_below="@+id/creatorView"
|
||||||
|
android:layout_marginStart="@dimen/listitem_group_member_indentation"
|
||||||
android:layout_marginLeft="@dimen/listitem_group_member_indentation"
|
android:layout_marginLeft="@dimen/listitem_group_member_indentation"
|
||||||
android:layout_marginTop="@dimen/margin_medium"/>
|
android:layout_marginTop="@dimen/margin_medium"/>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user