This repository has been archived by the owner on Jan 27, 2020. It is now read-only.
forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mastodon#1316 from pixiv/remove_switch_point
remove switch point
- Loading branch information
Showing
13 changed files
with
32 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
15 changes: 3 additions & 12 deletions
15
app/controllers/pawoo/sitemap/status_indexes_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
class Pawoo::Sitemap::StatusIndexesController < Pawoo::Sitemap::ApplicationController | ||
class Pawoo::Sitemap::StatusIndexesController < ApplicationController | ||
def index | ||
read_from_slave do | ||
@count = Pawoo::Sitemap::Status.page_count | ||
end | ||
@count = Pawoo::Sitemap::Status.page_count | ||
end | ||
|
||
def show | ||
page = params[:page] | ||
sitemap = Pawoo::Sitemap::Status.new(page) | ||
|
||
if sitemap.cached? | ||
read_from_slave do | ||
@status_pages = sitemap.query.load | ||
end | ||
else | ||
@status_pages = [] | ||
end | ||
@accounts = sitemap.cached? ? sitemap.query.load : [] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
# frozen_string_literal: true | ||
|
||
class Pawoo::Sitemap::UserIndexesController < Pawoo::Sitemap::ApplicationController | ||
class Pawoo::Sitemap::UserIndexesController < ApplicationController | ||
def index | ||
read_from_slave do | ||
@count = Pawoo::Sitemap::User.page_count | ||
end | ||
@count = Pawoo::Sitemap::User.page_count | ||
end | ||
|
||
def show | ||
page = params[:page] | ||
sitemap = Pawoo::Sitemap::User.new(page) | ||
|
||
if sitemap.cached? | ||
read_from_slave do | ||
@accounts = sitemap.query.load | ||
end | ||
else | ||
@accounts = [] | ||
end | ||
@accounts = sitemap.cached? ? sitemap.query.load : [] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.