We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae1bb45 commit 7660c91Copy full SHA for 7660c91
2 files changed
app/controllers/admin/tags_controller.rb
@@ -37,7 +37,8 @@ def set_tag
37
38
def set_usage_by_domain
39
@usage_by_domain = @tag.statuses
40
- .where(visibility: :public)
+ .with_public_visibility
41
+ .excluding_silenced_accounts
42
.where(Status.arel_table[:id].gteq(Mastodon::Snowflake.id_at(Time.now.utc.beginning_of_day)))
43
.joins(:account)
44
.group('accounts.domain')
app/views/admin/tags/show.html.haml
@@ -38,8 +38,10 @@
.table-wrapper
%table.table
%tbody
+ - total = @usage_by_domain.sum(&:statuses_count).to_f
+
- @usage_by_domain.each do |(domain, count)|
%tr
45
%th= domain || site_hostname
- %td= number_to_percentage((count / @tag.history[0][:uses].to_f) * 100)
46
+ %td= number_to_percentage((count / total) * 100, precision: 1)
47
%td= number_with_delimiter count
0 commit comments