mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Speed up API requests be using a persistent connection, increase news fetch buffer time to 30 seconds from 10 seconds.
This commit is contained in:
@@ -83,7 +83,7 @@ class W3DHub
|
||||
|
||||
if Gosu.milliseconds >= @w3dhub_news_expires
|
||||
@w3dhub_news = nil
|
||||
@w3dhub_news_expires = Gosu.milliseconds + 10_000 # seconds
|
||||
@w3dhub_news_expires = Gosu.milliseconds + 30_000 # seconds
|
||||
|
||||
@wd3hub_news_container.clear do
|
||||
title I18n.t(:"games.fetching_news"), padding: 8
|
||||
|
||||
@@ -37,7 +37,7 @@ class W3DHub
|
||||
|
||||
if Gosu.milliseconds >= @game_news["#{key}_expires"]
|
||||
@game_news.delete(key)
|
||||
@game_news["#{key}_expires"] = Gosu.milliseconds + 10_000 # seconds
|
||||
@game_news["#{key}_expires"] = Gosu.milliseconds + 30_000 # seconds
|
||||
|
||||
if @focused_game && @focused_game.id == key
|
||||
@game_news_container.clear do
|
||||
|
||||
Reference in New Issue
Block a user