Skip to content
Snippets Groups Projects

Allow (un)following someone in the user popover

10 files
+ 331
5
Compare changes
  • Side-by-side
  • Inline
Files
10
  • b5576a06
    Allow (un)following someone in the user popover · b5576a06
    Kev authored
    This adds a new button for signed-in users to the user popover to follow
    (or unfollow) the user shown in the popover. The goal of this is to
    greatly reduce the friction to follow (and unfollow) a user and make the
    following feature more widely-adopted. Previously, you had to visit the
    profile of the user you are trying to (un)follow and see the button in
    the top right of the page.
    
    This also allows you to quickly determine whether or not you are
    currently following a person.
    
    Changelog: added
@@ -35,6 +35,17 @@ class UsersCache extends Cache {
// missing catch is intentional, error handling depends on use case
}
updateById(userId, data) {
if (!this.hasData(userId)) {
return;
}
this.internalStorage[userId] = {
...this.internalStorage[userId],
...data,
};
}
retrieveStatusById(userId) {
if (this.hasData(userId) && this.get(userId).status) {
return Promise.resolve(this.get(userId).status);
Loading