mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2026-11-04 17:14:06 +00:00
Application updating and repair is now possible, save news and applications listing to cache directory instead of current working directory, added support for application unlinking, misc. other changes
This commit is contained in:
@@ -41,6 +41,22 @@ module W3DHubLauncher
|
||||
applications.find { |app| app.id == app_id && app.channel == channel_id }
|
||||
end
|
||||
|
||||
def add_or_update_application(application)
|
||||
index = applications.index { |app| app.id == application.id && app.channel == application.channel }
|
||||
|
||||
if index
|
||||
applications[index] = application
|
||||
else
|
||||
applications << application
|
||||
end
|
||||
|
||||
application
|
||||
end
|
||||
|
||||
def remove_application(application)
|
||||
applications.delete(application)
|
||||
end
|
||||
|
||||
# User explictly set options
|
||||
class Preferences
|
||||
SCHEMA = 0
|
||||
|
||||
Reference in New Issue
Block a user