1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-28 14:17:40 +00:00

minor bugfixes - cleanup

This commit is contained in:
kepler155c@gmail.com
2020-04-22 23:37:12 -06:00
parent 7224d441ca
commit b0d2ce0199
5 changed files with 20 additions and 27 deletions

View File

@@ -136,6 +136,19 @@ function tab:enable()
self:updateDrives()
self:updateInfo()
UI.Tab.enable(self)
self.handler = Event.on({ 'disk', 'disk_eject' }, function()
os.sleep(1)
if tab.enabled then
tab:updateDrives()
tab:updateInfo()
tab:sync()
end
end)
end
function tab:disable()
Event.off(self.handler)
UI.Tab.disable(self)
end
function tab:eventHandler(event)
@@ -147,11 +160,4 @@ function tab:eventHandler(event)
return true
end
Event.on({ 'disk', 'disk_eject' }, function()
os.sleep(1)
tab:updateDrives()
tab:updateInfo()
tab:sync()
end)
return tab