-
Notifications
You must be signed in to change notification settings - Fork 187
Conversation
} else { | ||
profile = new Profile({ peerID: guid }); | ||
this.profileFetch = profile.fetch(); | ||
this.profileFetch = getCachedProfiles([guid])[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to use the cached profiles after all. The latency improvement is substantial. And... even having the freshest moderator info doesn't really solve the issue. After a mod is added, whether it's 1 minute, 1 hour or 6 months later, that mod can change their terms and the users using that mod would have no idea. Perhaps it's as simple as sending a notification to users of a mod if the mod changes their terms? Seems like a bigger UX discussion we could circle back to.
I made a quick patch to apply the same changes to the connected peers page. #688 |
Edit: deleted my comment about the following, I got tripped up by Mike following me back within seconds of me following him. |
Apply the same changes to the connected peers page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A few minor things.
js/models/Follower.js
Outdated
@@ -1,10 +1,10 @@ | |||
/* Used for as a list item of both follower and following lists */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"used for as a list" sounds like a typo?
} | ||
} | ||
|
||
className() { | ||
return 'userPageFollow flexRow'; | ||
renderUsers(models = [], insertionType = 'append') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does models need a default if we throw an error if the models aren't passed in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't hurt. If they passed in null, it would default it.
js/views/userPage/UserPage.js
Outdated
this.miniProfile.setState({ followsYou: data.followsMe }); | ||
} | ||
|
||
if (this.followerCount === 0) this.followerCount += 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the followerCount being changed when checking if they follow you? That should affect the following count instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix that. It should be if you're on someone else's user page and they are following you, but their cached following count is 0, it should be 1 (because we know they're following at least one person).
This PR refactors the following / follower functionality as follows (see what I did there?):
closes #200