about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/stream_entries_helper.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb
index d5cc004b0..59aac7841 100644
--- a/app/helpers/stream_entries_helper.rb
+++ b/app/helpers/stream_entries_helper.rb
@@ -5,8 +5,12 @@ module StreamEntriesHelper
     account.display_name.blank? ? account.username : account.display_name
   end
 
+  def stream_link_target
+    embedded_view? ? '_blank' : nil
+  end
+
   def acct(account)
-    "@#{account.acct}#{@external_links && account.local? ? "@#{Rails.configuration.x.local_domain}" : ''}"
+    "@#{account.acct}#{embedded_view? && account.local? ? "@#{Rails.configuration.x.local_domain}" : ''}"
   end
 
   def entry_classes(status, is_predecessor, is_successor, include_threads)
@@ -30,4 +34,10 @@ module StreamEntriesHelper
 
     rtl_size / ltr_size > 0.3
   end
+
+  private
+
+  def embedded_view?
+    params[:controller] == 'stream_entries' && params[:action] == 'embed'
+  end
 end