add configuration option for autocollapse (#2)

This commit is contained in:
Dean Bassett
2022-12-29 17:26:08 -08:00
committed by neatchee
parent de67b567ad
commit ef665c1df5
5 changed files with 29 additions and 4 deletions

View File

@@ -251,6 +251,10 @@ class Status extends ImmutablePureComponent {
// as it could cause surprising changes when receiving notifications
if (settings.getIn(['content_warnings', 'shared_state']) && status.get('spoiler_text').length && !status.get('hidden')) return;
let autoCollapseHeight = autoCollapseSettings.get('height');
if (status.get('media_attachments').size && !muted) {
autoCollapseHeight += 300;
}
if (collapse ||
autoCollapseSettings.get('all') ||
(autoCollapseSettings.get('notifications') && muted) ||