mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 17:22:35 +00:00
Added confirm dialog, clicking uninstall game now triggers confirmation
This commit is contained in:
@@ -84,11 +84,20 @@ class W3DHub
|
||||
end
|
||||
|
||||
def uninstall(app_id, channel)
|
||||
puts "Uninstall Request: #{app_idchannel}"
|
||||
puts "Uninstall Request: #{app_id} #{channel}"
|
||||
|
||||
return false if !installed?(app_id, channel) || installing?(app_id, channel)
|
||||
|
||||
@tasks.push(Uninstaller.new(app_id, channel))
|
||||
return false unless (game = Store.applications.games.find { |g| g.id == app_id})
|
||||
|
||||
push_state(
|
||||
States::ConfirmDialog,
|
||||
title: "Uninstall #{game.name}?",
|
||||
message: "Are you sure you want to uninstall #{game.name} (#{channel})?",
|
||||
accept_callback: proc {
|
||||
@tasks.push(Uninstaller.new(app_id, channel))
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
def show_folder(app_id, channel, type)
|
||||
|
||||
Reference in New Issue
Block a user