mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-27 13:16:07 +00:00
Replace glitch-soc's collapsed toots with upstream's “Read more” (#2916)
* Remove glitch-soc's post collapse feature * Get rid of the infamous `parseClick` * Remove unused CSS * Use upstream's “Read More” implementation * Update translation strings
This commit is contained in:
@@ -63,19 +63,6 @@ export const Conversation = ({ conversation, scrollKey, onMoveUp, onMoveDown })
|
||||
const sharedCWState = useSelector(state => state.getIn(['state', 'content_warnings', 'shared_state']));
|
||||
const [expanded, setExpanded] = useState(undefined);
|
||||
|
||||
const parseClick = useCallback((e, destination) => {
|
||||
if (e.button === 0 && !(e.ctrlKey || e.altKey || e.metaKey)) {
|
||||
if (destination === undefined) {
|
||||
if (unread) {
|
||||
dispatch(markConversationRead(id));
|
||||
}
|
||||
destination = `/statuses/${lastStatus.get('id')}`;
|
||||
}
|
||||
history.push(destination);
|
||||
e.preventDefault();
|
||||
}
|
||||
}, [dispatch, history, unread, id, lastStatus]);
|
||||
|
||||
const handleMouseEnter = useCallback(({ currentTarget }) => {
|
||||
if (autoPlayGif) {
|
||||
return;
|
||||
@@ -215,7 +202,7 @@ export const Conversation = ({ conversation, scrollKey, onMoveUp, onMoveDown })
|
||||
|
||||
<StatusContent
|
||||
status={lastStatus}
|
||||
parseClick={parseClick}
|
||||
onClick={handleClick}
|
||||
expanded={sharedCWState ? lastStatus.get('hidden') : expanded}
|
||||
onExpandedToggle={handleShowMore}
|
||||
collapsible
|
||||
|
||||
Reference in New Issue
Block a user