diff --git a/app/assets/stylesheets/articles.scss b/app/assets/stylesheets/articles.scss index 853581862..20fbc903e 100644 --- a/app/assets/stylesheets/articles.scss +++ b/app/assets/stylesheets/articles.scss @@ -13,6 +13,9 @@ @media screen and ( min-width: 950px ){ margin-top:26px; } + @media screen and ( min-width: 2650px ){ + max-width: 1300px; + } &.sub-home{ margin-top:10px; .side-bar{ @@ -232,6 +235,18 @@ opacity:0.9; } } + .tiny-pic{ + display: inline-block; + height: 30px; + width: 30px; + img{ + height:100%; + width:100%; + &.round{ + border-radius: 30px; + } + } + } .content{ float:left; width:calc(100% - 75px); diff --git a/app/assets/stylesheets/notifications.scss b/app/assets/stylesheets/notifications.scss index 17fc37c87..c76373311 100644 --- a/app/assets/stylesheets/notifications.scss +++ b/app/assets/stylesheets/notifications.scss @@ -110,6 +110,9 @@ font-size:0.8em; opacity:0.9; } + .follower-pic-row{ + display: inline-block; + } } .comment-link-wrapper{ display:block; diff --git a/app/models/follow.rb b/app/models/follow.rb index af8fd8cc6..45677cf6e 100644 --- a/app/models/follow.rb +++ b/app/models/follow.rb @@ -30,7 +30,6 @@ class Follow < ApplicationRecord validates :followable_id, uniqueness: { scope: [:followable_type, :follower_id] } - def activity_actor follower end @@ -44,10 +43,6 @@ class Follow < ApplicationRecord followable end - def activity_target - return "follow_#{Time.now}" - end - def remove_from_feed super if followable_type == "User" @@ -76,5 +71,4 @@ class Follow < ApplicationRecord end end handle_asynchronously :send_email_notification - end diff --git a/app/models/reaction.rb b/app/models/reaction.rb index 2935117c8..9aac613f1 100644 --- a/app/models/reaction.rb +++ b/app/models/reaction.rb @@ -34,7 +34,7 @@ class Reaction < ApplicationRecord self.includes(:reactable). where(reactable_type: "Article", user_id: user.id). where("created_at > ?", 5.days.ago). - select('distinct on (reactable_id) *'). + select("distinct on (reactable_id) *"). take(15) end @@ -50,7 +50,7 @@ class Reaction < ApplicationRecord def activity_notify return if user_id == reactable.user_id - return if points < 0 + return if points.negative? [StreamNotifier.new(reactable.user.id).notify] end diff --git a/app/views/notifications/_aggregated_follows.html.erb b/app/views/notifications/_aggregated_follows.html.erb new file mode 100644 index 000000000..11659e591 --- /dev/null +++ b/app/views/notifications/_aggregated_follows.html.erb @@ -0,0 +1,44 @@ +<% cache "activity-aggregated-follows-#{group['activities'].last['id']}_#{group['activities'].first['id']}_#{group['is_seen']}" do %> + <% unless group['activities'][0]['object'].class.name == "String" %> + <% followers = group['activities'].map { |a| a['actor'] } %> +