1
0

fix: home timeline dm visibility

This commit is contained in:
オスカー、 2024-04-08 12:41:32 +09:00
parent d17d3bd370
commit 0f4b5c17f4
No known key found for this signature in database
GPG Key ID: B1EFBBF5C93FF78F
3 changed files with 6 additions and 5 deletions

View File

@ -9,11 +9,12 @@ import PersonAddIcon from '@/material-icons/400-24px/person_add.svg?react';
import RepeatIcon from '@/material-icons/400-24px/repeat.svg?react';
import ReplyAllIcon from '@/material-icons/400-24px/reply_all.svg?react';
import StarIcon from '@/material-icons/400-24px/star.svg?react';
import MailIcon from '@/material-icons/400-24px/mail.svg?react';
import { Icon } from 'mastodon/components/icon';
const tooltips = defineMessages({
mentions: { id: 'notifications.filter.mentions', defaultMessage: 'Mentions' },
direct: { id: 'notifications.filter.directmessages', defaultMessage: 'DM' },
direct: { id: 'notifications.filter.directmessages', defaultMessage: 'Direct Messages' },
favourites: { id: 'notifications.filter.favourites', defaultMessage: 'Favorites' },
boosts: { id: 'notifications.filter.boosts', defaultMessage: 'Boosts' },
polls: { id: 'notifications.filter.polls', defaultMessage: 'Poll results' },
@ -80,7 +81,7 @@ class FilterBar extends PureComponent {
onClick={this.onClick('direct')}
title={intl.formatMessage(tooltips.direct)}
>
<Icon id='envelope-o' fixedWidth />
<Icon id='mail' icon={MailIcon} />
</button>
<button
className={selectedFilter === 'favourite' ? 'active' : ''}

View File

@ -440,7 +440,7 @@ class Notification extends ImmutablePureComponent {
const account = notification.get('account');
const displayNameHtml = { __html: account.get('display_name_html') };
const link = <bdi><Link className='notification__display-name' href={`/@${account.get('acct')}`} title={account.get('acct')} to={`/@${account.get('acct')}`} dangerouslySetInnerHTML={displayNameHtml} /></bdi>;
switch(notification.get('type')) {
case 'follow':
return this.renderFollow(notification, account, link);
@ -449,7 +449,7 @@ class Notification extends ImmutablePureComponent {
case 'mention':
return this.renderMention(notification);
case 'direct':
return this.renderMention(notification);
return this.renderMention(notification);
case 'favourite':
return this.renderFavourite(notification, link);
case 'reblog':

View File

@ -28,7 +28,7 @@ class Feed
unhydrated = redis.zrangebyscore(key, "(#{min_id}", "(#{max_id}", limit: [0, limit], with_scores: true).map { |id| id.first.to_i }
end
Status.where(id: unhydrated).cache_ids
Status.without_direct_visibility.where(id: unhydrated).cache_ids
end
def key