profile: update profile images
#42
Closed
offbyn
wants to merge 1 commits from update-profile-imgs
into master
Loading…
Reference in New Issue
There is no content yet.
Delete Branch 'update-profile-imgs'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Textnotes often miss profile pictures of authors because they
are rendered when received even without knowing the pic yet.
Update profile pic of already rendered textnotes with the picture
of the first kind 0 event that has a valid picture, should now
render missing profile pics.
4195d438d9
tocc174060a3
2 years agolgtm
sometime in the future, consider using a hashmap (object?) in
getMetadata
. instead of this:do something like this:
it's a linear search O(N) vs theoretically O(1) object value lookup by key: http://jsben.ch/Y9jDP
as the userlist grows it'll be slower and slower.
then, could it make sense to store
userMap
in localStorage or indexeddb? so on next page reload you already have all previously seen metadata.cc174060a3
to05cae37e3b
2 years ago05cae37e3b
toa3c0c5bfe1
2 years agoa3c0c5bfe1
to2683b072fe
2 years agouserMap object should be fasted, but I am not sure how many contacts a client should keep.
Object in localStorage need to be stringified. so can't query from localStorage diretly, (unless each user would have it's own localstorage key, but that feels messy/wrong).
I wanted to use indexdb anyway for received events. but not sure yet.
maybe one advantage of userList array could be that it is sorted on access and could forget oldest accessed users after 1000 or so newer users.
superseded by #45
Reviewers
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.