diff --git a/lib/states/boot.rb b/lib/states/boot.rb index 831230b..d94f0d5 100644 --- a/lib/states/boot.rb +++ b/lib/states/boot.rb @@ -70,6 +70,10 @@ class W3DHub @task_index += 1 if @tasks.dig(@tasks.keys[@task_index], :complete) end + def needs_repaint? + true + end + def refresh_user_token if Store.settings[:account, :data] account = Api::Account.new(Store.settings[:account, :data], {}) diff --git a/lib/window.rb b/lib/window.rb index d85268c..5c92073 100644 --- a/lib/window.rb +++ b/lib/window.rb @@ -40,16 +40,8 @@ class W3DHub sleep(update_interval / 1000.0) if W3DHub::BackgroundWorker.busy? || Store.application_manager.busy? end - def gain_focus - super - - self.update_interval = 1000.0 / 60 - end - - def lose_focus - super - - self.update_interval = 1000.0 / 10 + def needs_redraw? + states.any?(&:needs_repaint?) end def close