favourites: fix isOwnAccount check

This commit is contained in:
Alex Gleason 2023-09-01 13:48:24 -05:00
parent 2ad7cb3b70
commit 41616c084e
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -29,7 +29,7 @@ const Favourites: React.FC<IFavourites> = ({ params }) => {
const { account, isUnavailable } = useAccountLookup(params?.username, { withRelationship: true }); const { account, isUnavailable } = useAccountLookup(params?.username, { withRelationship: true });
const username = params?.username || ''; const username = params?.username || '';
const isOwnAccount = username.toLowerCase() === ownAccount?.username?.toLowerCase(); const isOwnAccount = username.toLowerCase() === ownAccount?.acct?.toLowerCase();
const timelineKey = isOwnAccount ? 'favourites' : `favourites:${account?.id}`; const timelineKey = isOwnAccount ? 'favourites' : `favourites:${account?.id}`;
const statusIds = useAppSelector(state => state.status_lists.get(timelineKey)?.items || ImmutableOrderedSet<string>()); const statusIds = useAppSelector(state => state.status_lists.get(timelineKey)?.items || ImmutableOrderedSet<string>());