[Glitch] Hide "Follows you" badge when viewing your own list of followers
Port 2fed2edd5e to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
e4c8ac82bd
commit
ddd1007ef1
3 files changed
+20
-12
No files matched your search
@@ -30,6 +30,7 @@ interface AccountListProps {
|
||||
list?: AccountList | null;
|
||||
loadMore: () => void;
|
||||
prependAccountId?: string | null;
|
||||
withoutFollowsYouBadge?: boolean;
|
||||
scrollKey: string;
|
||||
}
|
||||
|
||||
@@ -42,6 +43,7 @@ export const AccountList: FC<AccountListProps> = ({
|
||||
list,
|
||||
loadMore,
|
||||
prependAccountId,
|
||||
withoutFollowsYouBadge,
|
||||
scrollKey,
|
||||
}) => {
|
||||
const account = useAccount(accountId);
|
||||
@@ -59,6 +61,7 @@ export const AccountList: FC<AccountListProps> = ({
|
||||
key={followerId}
|
||||
accountId={followerId}
|
||||
withBio={false}
|
||||
badge={withoutFollowsYouBadge ? false : null}
|
||||
/>
|
||||
)) ?? [];
|
||||
|
||||
@@ -68,11 +71,12 @@ export const AccountList: FC<AccountListProps> = ({
|
||||
key={prependAccountId}
|
||||
accountId={prependAccountId}
|
||||
withBio={false}
|
||||
badge={withoutFollowsYouBadge ? false : null}
|
||||
/>,
|
||||
);
|
||||
}
|
||||
return children;
|
||||
}, [prependAccountId, list, forceEmptyState]);
|
||||
}, [prependAccountId, list, forceEmptyState, withoutFollowsYouBadge]);
|
||||
|
||||
const columnRef = useRef<ColumnRef>(null);
|
||||
const handleHeaderClick = useCallback(() => {
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
import { useAccount } from '@/flavours/glitch/hooks/useAccount';
|
||||
import { useAccountId } from '@/flavours/glitch/hooks/useAccountId';
|
||||
import { useRelationship } from '@/flavours/glitch/hooks/useRelationship';
|
||||
import { me } from '@/flavours/glitch/initial_state';
|
||||
import { selectUserListWithoutMe } from '@/flavours/glitch/selectors/user_lists';
|
||||
import { useAppDispatch, useAppSelector } from '@/flavours/glitch/store';
|
||||
|
||||
@@ -88,6 +89,7 @@ const Followers: FC = () => {
|
||||
list={followerList}
|
||||
loadMore={loadMore}
|
||||
prependAccountId={followerId}
|
||||
withoutFollowsYouBadge={accountId === me}
|
||||
scrollKey='followers'
|
||||
/>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user