kachnitel / RideTime

Mountain bike social riding app
3 stars 0 forks source link

User profile friends do not show properly #51

Closed kachnitel closed 4 years ago

kachnitel commented 4 years ago

Only an empty circle without a name is shown in the Friends list of an user's public profile

see ridetime-server#22

Update lists to return thumbnails for friends. Show list items using thumbnails, and when the list is displayed, run a 'populate' on background for IDs shown

kachnitel commented 4 years ago

De-dupe lists:

Referencing options

Use IDs only

Use "thumbnail"

Add thumbnail to store

1) updateFriends/addFriend creates the entity with info from thumbnail 2) ID of created entity is added to friends list (or whichever entity) 3) List component then uses [ids] and each list item uses user.getThumbnail() (as getSync would fail, get would be inefficient and all details would instead load in background)

Issues

Use full items

Issues

{
  "result": { ... },
  "relatedEntities": {
    "users": [],
    "events": []
  }
}
kachnitel commented 4 years ago

WIP on receiving related entities (JSON:API inspired style) in stores in 4eabecbc972a558a0046da952ed0f932162c3edc

The next dilemma will be:

Distribute received entities to other stores (user receives locations, events in detail)

kachnitel commented 4 years ago

API 0.3.0 now sends relatedEntities to populate the store, list renders correctly. Also de-duped identical list components (FriendsList and RidersList)