Fix #4522: Sidebar doesn't show most searched tags at certain times of day.

Revert back to previous workaround of fetching previous day if current
day returns no result. A terrible hack, really we should convert dates
to Reportbooru's timezone, but that has other complications.
This commit is contained in:
evazion
2020-06-19 13:49:22 -05:00
parent 67a52dbc2d
commit 7a1efc2744
5 changed files with 23 additions and 22 deletions

View File

@@ -15,7 +15,7 @@
</tr>
</thead>
<tbody>
<% @search_service.missed_search_rankings.each do |tags, count| %>
<% @missed_searches.each do |tags, count| %>
<tr class="tag-type-<%= Tag.category_for(tags) %>">
<td><%= link_to tags, posts_path(:tags => tags) %></td>
<td>

View File

@@ -13,7 +13,7 @@
</tr>
</thead>
<tbody>
<% @search_service.post_search_rankings(@date).each do |tags, count| %>
<% @searches.each do |tags, count| %>
<tr class="tag-type-<%= Tag.category_for(tags) %>">
<td><%= link_to tags, posts_path(:tags => tags) %></td>
<td style="text-align: right;"><%= count.to_i %></td>