[Glitch] Add quoted_update notification type
Port f3a932d8a1 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
7e25f6b606
commit
0710138578
6 files changed
+88
-3
No files matched your search
@@ -9,7 +9,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
|
||||
import FlagIcon from '@/material-icons/400-24px/flag-fill.svg?react';
|
||||
import FormatQuoteIcon from '@/material-icons/400-24px/format_quote.svg?react';
|
||||
import PersonIcon from '@/material-icons/400-24px/person-fill.svg?react';
|
||||
import PersonAddIcon from '@/material-icons/400-24px/person_add-fill.svg?react';
|
||||
import { Account } from 'flavours/glitch/components/account';
|
||||
@@ -286,6 +285,31 @@ class Notification extends ImmutablePureComponent {
|
||||
);
|
||||
}
|
||||
|
||||
renderQuotedUpdate (notification) {
|
||||
return (
|
||||
<StatusQuoteManager
|
||||
containerId={notification.get('id')}
|
||||
hidden={!!this.props.hidden}
|
||||
id={notification.get('status')}
|
||||
account={notification.get('account')}
|
||||
prepend='quoted_update'
|
||||
muted
|
||||
notification={notification}
|
||||
onMoveDown={this.handleMoveDown}
|
||||
onMoveUp={this.handleMoveUp}
|
||||
onMention={this.props.onMention}
|
||||
contextType='notifications'
|
||||
getScrollPosition={this.props.getScrollPosition}
|
||||
updateScrollBottom={this.props.updateScrollBottom}
|
||||
cachedMediaWidth={this.props.cachedMediaWidth}
|
||||
cacheMediaWidth={this.props.cacheMediaWidth}
|
||||
onUnmount={this.props.onUnmount}
|
||||
withDismiss
|
||||
unread={this.props.unread}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
renderPoll (notification) {
|
||||
return (
|
||||
<StatusQuoteManager
|
||||
@@ -448,6 +472,8 @@ class Notification extends ImmutablePureComponent {
|
||||
return this.renderStatus(notification);
|
||||
case 'update':
|
||||
return this.renderUpdate(notification);
|
||||
case 'quoted_update':
|
||||
return this.renderQuotedUpdate(notification);
|
||||
case 'poll':
|
||||
return this.renderPoll(notification);
|
||||
case 'severed_relationships':
|
||||
|
||||
Reference in new issue
Block a user