about summary refs log tree commit diff
path: root/app/views/statuses
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2020-12-05 17:33:29 +0100
committerClaire <claire.github-309c@sitedethib.com>2020-12-05 17:33:37 +0100
commitf8d867bac43e7e18d293ac32a9be597d1f46dce3 (patch)
treeb3d950a01a8dee5403081f56cf0c6b0571954e90 /app/views/statuses
parent13df125b6c75923ccc21a5c57053e680cea75f38 (diff)
parent44d5c6bc8ffd92cd201380dabe35748e50b6af68 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- `app/services/remove_status_service.rb`:
  Conflict caused by us having a distinc Direct timeline.
  Ported upstream changes.
- `app/javascript/mastodon/features/compose/components/compose_form.js`:
  Conflict between glitch-soc's variable character limit and upstream
  refactoring that part of the code.
  Ported upstream changes.
Diffstat (limited to 'app/views/statuses')
-rw-r--r--app/views/statuses/_simple_status.html.haml5
-rw-r--r--app/views/statuses/_status.html.haml2
2 files changed, 5 insertions, 2 deletions
diff --git a/app/views/statuses/_simple_status.html.haml b/app/views/statuses/_simple_status.html.haml
index 199061c46..cbeefdffe 100644
--- a/app/views/statuses/_simple_status.html.haml
+++ b/app/views/statuses/_simple_status.html.haml
@@ -1,3 +1,6 @@
+:ruby
+  hide_show_thread ||= false
+
 .status{ class: "status-#{status.visibility}" }
   .status__info
     = link_to ActivityPub::TagManager.instance.url_for(status), class: 'status__relative-time u-url u-uid', target: stream_link_target, rel: 'noopener noreferrer' do
@@ -47,7 +50,7 @@
   - elsif status.preview_card
     = react_component :card, sensitive: sensitized?(status, current_account), 'maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_card, serializer: REST::PreviewCardSerializer).as_json
 
-  - if !status.in_reply_to_id.nil? && status.in_reply_to_account_id == status.account.id
+  - if !status.in_reply_to_id.nil? && status.in_reply_to_account_id == status.account.id && !hide_show_thread
     = link_to ActivityPub::TagManager.instance.url_for(status), class: 'status__content__read-more-button', target: stream_link_target, rel: 'noopener noreferrer' do
       = t 'statuses.show_thread'
 
diff --git a/app/views/statuses/_status.html.haml b/app/views/statuses/_status.html.haml
index 650f9b679..13a06519c 100644
--- a/app/views/statuses/_status.html.haml
+++ b/app/views/statuses/_status.html.haml
@@ -39,7 +39,7 @@
       %span
         = t('stream_entries.pinned')
 
-  = render (centered ? 'statuses/detailed_status' : 'statuses/simple_status'), status: status.proper, autoplay: autoplay
+  = render (centered ? 'statuses/detailed_status' : 'statuses/simple_status'), status: status.proper, autoplay: autoplay, hide_show_thread: is_predecessor || is_successor
 
 - if include_threads
   - if @since_descendant_thread_id