Browse Source

pin statuses pinned by Account(1)

pull/4/head
欧醚 5 years ago
parent
commit
f0ad5eaea7
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      app/controllers/api/v1/timelines/public_controller.rb

+ 6
- 1
app/controllers/api/v1/timelines/public_controller.rb View File

@ -18,7 +18,12 @@ class Api::V1::Timelines::PublicController < Api::BaseController
end
def load_statuses
cached_public_statuses
(cached_0_pinned_statuses + cached_public_statuses).uniq { |p| p.id }
end
def cached_0_pinned_statuses
z_pinned = Account.find(1).pinned_statuses
cache_collection z_pinned, Status
end
def cached_public_statuses

Loading…
Cancel
Save