Fixed auto selected server not checking if full, fixed game icon on bar only showing update available icon for 'first' channel

This commit is contained in:
2024-03-14 11:34:42 -05:00
parent a1810e3f2c
commit 80d1fa865c
2 changed files with 2 additions and 2 deletions

View File

@@ -250,7 +250,7 @@ class W3DHub
return nil unless app_data return nil unless app_data
found_server = Store.server_list.select do |server| found_server = Store.server_list.select do |server|
server.game == app_id && server.channel == channel && !server.status.password server.game == app_id && server.channel == channel && !server.status.password && server.status.player_count < server.status.max_players
end&.first end&.first
found_server ? found_server : nil found_server ? found_server : nil

View File

@@ -89,7 +89,7 @@ class W3DHub
image_color = Store.application_manager.installed?(game.id, game.channels.first.id) ? 0xff_ffffff : 0x66_ffffff image_color = Store.application_manager.installed?(game.id, game.channels.first.id) ? 0xff_ffffff : 0x66_ffffff
flow(width: 1.0, height: 1.0, margin: 8, background_image: image_path, background_image_color: image_color, background_image_mode: :fill_height) do flow(width: 1.0, height: 1.0, margin: 8, background_image: image_path, background_image_color: image_color, background_image_mode: :fill_height) do
image "#{GAME_ROOT_PATH}/media/ui_icons/import.png", width: 24, margin_left: -4, margin_top: -6, color: 0xff_ff8800 if Store.application_manager.updateable?(game.id, game.channels.first.id) image "#{GAME_ROOT_PATH}/media/ui_icons/import.png", width: 24, margin_left: -4, margin_top: -6, color: 0xff_ff8800 if game.channels.any? { |channel| Store.application_manager.updateable?(game.id, channel.id) }
end end
# para game.name, width: 1.0, text_align: :center # para game.name, width: 1.0, text_align: :center