Merge branch 'lf/contacts-separate-user' (#2766)

* origin/lf/contacts-separate-user:
  groups-js: seperate user's ship from rest of contacts

Signed-off-by: Jared Tobin <jared@tlon.io>
This commit is contained in:
Jared Tobin 2020-04-21 13:06:49 +04:00
commit bee001de26
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4

View File

@ -20,8 +20,11 @@ export class ContactSidebar extends Component {
let responsiveClasses =
props.activeDrawer === "contacts" ? "db" : "dn db-ns";
let me = (window.ship in props.defaultContacts) ?
props.defaultContacts[window.ship] : { color: '0x0', nickname: null};
let me = (window.ship in props.contacts)
? props.contacts[window.ship]
: (window.ship in props.defaultContacts)
? props.defaultContacts[window.ship]
: { color: '0x0', nickname: null };
let shareSheet =
!(window.ship in props.contacts) ?
@ -32,11 +35,23 @@ export class ContactSidebar extends Component {
path={props.path}
selected={props.path + "/" + window.ship === props.selectedContact}
/>
) : (<div></div>);
) : (
<>
<h2 className="f9 pt4 pr4 pb2 pl4 gray2 c-default">You</h2>
<ContactItem
ship={window.ship}
nickname={me.nickname}
color={me.color}
path={props.path}
selected={props.path + "/" + window.ship === props.selectedContact}
/>
</>
);
group.delete(window.ship);
let contactItems =
Object.keys(props.contacts)
.filter(c => c !== window.ship)
.map((contact) => {
group.delete(contact);
let path = props.path + "/" + contact;