attack program - new

This commit is contained in:
kepler155c
2018-11-23 13:55:21 -05:00
parent fa43186d52
commit 252fdfb138
2 changed files with 79 additions and 8 deletions

View File

@@ -245,6 +245,14 @@ function listingPage:eventHandler(event)
end
function listingPage:enable()
local function updateStatus()
self.statusBar.storageStatus.value =
context.storage:isOnline() and '' or 'offline'
self.statusBar.storageStatus.textColor =
context.storage:isOnline() and colors.lime or colors.red
end
updateStatus()
Event.onTimeout(0, function()
self:refresh()
self:draw()
@@ -259,14 +267,6 @@ function listingPage:enable()
self:sync()
end)
local function updateStatus()
self.statusBar.storageStatus.value =
context.storage:isOnline() and '' or 'offline'
self.statusBar.storageStatus.textColor =
context.storage:isOnline() and colors.lime or colors.red
end
updateStatus()
self.handler = Event.on({ 'storage_offline', 'storage_online' }, function()
updateStatus()
self.statusBar.storageStatus:draw()