about summary refs log tree commit diff
path: root/app/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript')
-rw-r--r--app/javascript/glitch/components/local_settings/page/index.js10
-rw-r--r--app/javascript/glitch/components/status/index.js4
-rw-r--r--app/javascript/glitch/locales/en.json1
-rw-r--r--app/javascript/glitch/reducers/local_settings.js1
4 files changed, 16 insertions, 0 deletions
diff --git a/app/javascript/glitch/components/local_settings/page/index.js b/app/javascript/glitch/components/local_settings/page/index.js
index 366c113c0..498230f7b 100644
--- a/app/javascript/glitch/components/local_settings/page/index.js
+++ b/app/javascript/glitch/components/local_settings/page/index.js
@@ -126,6 +126,16 @@ export default class LocalSettingsPage extends React.PureComponent {
           </LocalSettingsPageItem>
           <LocalSettingsPageItem
             settings={settings}
+            item={['collapsed', 'auto', 'reblogs']}
+            id='mastodon-settings--collapsed-auto-reblogs'
+            onChange={onChange}
+            dependsOn={[['collapsed', 'enabled']]}
+            dependsOnNot={[['collapsed', 'auto', 'all']]}
+          >
+            <FormattedMessage id='settings.auto_collapse_reblogs' defaultMessage='Boosts' />
+          </LocalSettingsPageItem>
+          <LocalSettingsPageItem
+            settings={settings}
             item={['collapsed', 'auto', 'replies']}
             id='mastodon-settings--collapsed-auto-replies'
             onChange={onChange}
diff --git a/app/javascript/glitch/components/status/index.js b/app/javascript/glitch/components/status/index.js
index 9e758793c..6bd95b051 100644
--- a/app/javascript/glitch/components/status/index.js
+++ b/app/javascript/glitch/components/status/index.js
@@ -287,6 +287,7 @@ properly and our intersection observer is good to go.
       muted,
       id,
       intersectionObserverWrapper,
+      prepend,
     } = this.props;
     const autoCollapseSettings = settings.getIn(['collapsed', 'auto']);
 
@@ -300,6 +301,9 @@ properly and our intersection observer is good to go.
           status.get('media_attachments').size && !muted ? 650 : 400
         )
       ) || (
+        autoCollapseSettings.get('reblogs') &&
+        prepend === 'reblogged_by'
+      ) || (
         autoCollapseSettings.get('replies') &&
         status.get('in_reply_to_id', null) !== null
       ) || (
diff --git a/app/javascript/glitch/locales/en.json b/app/javascript/glitch/locales/en.json
index 18e412356..69aa29108 100644
--- a/app/javascript/glitch/locales/en.json
+++ b/app/javascript/glitch/locales/en.json
@@ -14,6 +14,7 @@
   "settings.auto_collapse_lengthy": "Lengthy toots",
   "settings.auto_collapse_media": "Toots with media",
   "settings.auto_collapse_notifications": "Notifications",
+  "settings.auto_collapse_reblogs": "Boosts",
   "settings.auto_collapse_replies": "Replies",
   "settings.close": "Close",
   "settings.collapsed_statuses": "Collapsed toots",
diff --git a/app/javascript/glitch/reducers/local_settings.js b/app/javascript/glitch/reducers/local_settings.js
index 813e130ca..03654fbe2 100644
--- a/app/javascript/glitch/reducers/local_settings.js
+++ b/app/javascript/glitch/reducers/local_settings.js
@@ -59,6 +59,7 @@ const initialState = ImmutableMap({
       all              : false,
       notifications    : true,
       lengthy          : true,
+      reblogs          : false,
       replies          : false,
       media            : false,
     }),