Skip to content

Clean up usage of user and room avatars

Charles Wright requested to merge cvwright/275-293-avatars into main

There were lots of places where we were crafting an avatar for a user or a room directly in some view, using a direct call to Image(). These were error-prone and brittle, since they needed just the right combination of .resizable() and scaling, and since they needed an .onAppear() to automatically load the data if it is missing.

All this is fixed in the UserAvatarView and RoomAvatar, so all that remained was to switch those last holdover views to use them.

Also along the way I made some important fixes to:

  • Friend-of-a-friend section on the People tab
  • Followed timeline detail view on the Circles tab

Finally, I renamed RoomAvatar to RoomAvatarView to disambiguate it vs the RoomAvatarContent state event content struct.

Closes #275 (closed) Closes #293 (closed)

Edited by Charles Wright

Merge request reports