Make tab navigation more intuitive

This commit is contained in:
Kamil Chojnowski 2014-01-15 02:32:02 +01:00
parent 20b68c6a42
commit 291960d159
1 changed files with 5 additions and 1 deletions

View File

@ -390,6 +390,8 @@ function UIMoveableTabBar:selectNextTab()
local widget = showPostTab(self) local widget = showPostTab(self)
self:selectTab(widget) self:selectTab(widget)
updateTabs(self) updateTabs(self)
else
self:selectTab(self.tabs[1])
end end
return return
end end
@ -418,6 +420,8 @@ function UIMoveableTabBar:selectPrevTab()
local widget = showPreTab(self) local widget = showPreTab(self)
self:selectTab(widget) self:selectTab(widget)
updateTabs(self) updateTabs(self)
else
self:selectTab(self.tabs[#self.tabs])
end end
return return
end end
@ -461,4 +465,4 @@ function UIMoveableTabBar:setNavigation(prevButton, nextButton)
nextNavigation.onClick = function() self:selectNextTab() end nextNavigation.onClick = function() self:selectNextTab() end
end end
updateNavigation(self) updateNavigation(self)
end end