Attempt to fix #125 (#129)

This commit is contained in:
Max Wofford
2025-03-26 02:01:16 -04:00
committed by GitHub
parent c4c8e330ab
commit a8d2fcd5b9
2 changed files with 6 additions and 2 deletions

View File

@@ -47,7 +47,11 @@ class StaticPagesController < ApplicationController
@todays_languages = language_counts.map(&:first)
@todays_editors = editor_counts.map(&:first)
@show_logged_time_sentence = @todays_languages.any? || @todays_editors.any?
@todays_duration = current_user.heartbeats.today.duration_seconds
if @todays_duration > 1.minute
@show_logged_time_sentence = @todays_languages.any? || @todays_editors.any?
end
cached_data = filterable_dashboard_data
cached_data.entries.each do |key, value|

View File

@@ -69,7 +69,7 @@
<% if @show_logged_time_sentence %>
You've logged
<%= short_time_detailed current_user.heartbeats.today.duration_seconds %>
<%= short_time_detailed @todays_duration %>
<% if @todays_languages.any? || @todays_editors.any? %>
across
<% if @todays_languages.any? %>