dxos-deprecated / halo

HALO
GNU Affero General Public License v3.0
0 stars 1 forks source link

Remove events complexity #32

Closed richburdon closed 4 years ago

richburdon commented 4 years ago

We can't have async event listeners in constructors!

https://github.com/dxos/halo/blob/bd8114117201829c4f38bed89887c4f956696c75/packages/party-manager/src/party-member-info.js#L55

Please also do not pass "large" objects into smaller ones. PartyMemberInfo is basically a struct, but is passed the entire party manager. Remove.

isMe is badly named. It's conceivable that this might be a property of this data structure, but not something that should be computed each time.

https://github.com/dxos/halo/blob/bd8114117201829c4f38bed89887c4f956696c75/packages/party-manager/src/party-member-info.js#L90

Also, why does this data structure object need to be an EventListener?

richburdon commented 4 years ago

Rolling into https://github.com/dxos/halo/issues/34