1
0
Fork 0
forked from gitea/nas

feat: Add "Followers you know" widget to user profiles (#34652)

This commit is contained in:
diondiondion 2025-05-13 08:38:18 +02:00 committed by GitHub
parent c9a554bdca
commit b135a831ea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 213 additions and 17 deletions

View file

@ -59,3 +59,16 @@ export const getAccountHidden = createSelector(
return hidden && !(isSelf || followingOrRequested);
},
);
export const getAccountFamiliarFollowers = createSelector(
[
(state: RootState) => state.accounts,
(state: RootState, id: string) => state.accounts_familiar_followers[id],
],
(accounts, accounts_familiar_followers) => {
if (!accounts_familiar_followers) return null;
return accounts_familiar_followers
.map((id) => accounts.get(id))
.filter((f) => !!f);
},
);