0
0
Fork 0

Remove "most popular" tab from profile directory, add responsive design (#9539)

* Remove "most popular" tab from profile directory, add responsive design

* Remove unused translations
This commit is contained in:
Eugen Rochko 2018-12-17 03:14:28 +01:00 committed by GitHub
parent 628da11e38
commit 087e118971
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 43 additions and 62 deletions

View file

@ -91,9 +91,8 @@ class Account < ApplicationRecord
scope :matches_display_name, ->(value) { where(arel_table[:display_name].matches("#{value}%")) }
scope :matches_domain, ->(value) { where(arel_table[:domain].matches("%#{value}%")) }
scope :searchable, -> { where(suspended: false).where(moved_to_account_id: nil) }
scope :discoverable, -> { where(silenced: false).where(discoverable: true).joins(:account_stat).where(AccountStat.arel_table[:followers_count].gteq(MIN_FOLLOWERS_DISCOVERY)) }
scope :discoverable, -> { searchable.where(silenced: false).where(discoverable: true).joins(:account_stat).where(AccountStat.arel_table[:followers_count].gteq(MIN_FOLLOWERS_DISCOVERY)).by_recent_status }
scope :tagged_with, ->(tag) { joins(:accounts_tags).where(accounts_tags: { tag_id: tag }) }
scope :popular, -> { order('account_stats.followers_count desc') }
scope :by_recent_status, -> { order(Arel.sql('(case when account_stats.last_status_at is null then 1 else 0 end) asc, account_stats.last_status_at desc')) }
delegate :email,