Update tabs navigation to take offscreen tabs into account
This commit is contained in:
parent
291960d159
commit
b718ae0423
|
@ -389,10 +389,16 @@ function UIMoveableTabBar:selectNextTab()
|
||||||
if #self.postTabs > 0 then
|
if #self.postTabs > 0 then
|
||||||
local widget = showPostTab(self)
|
local widget = showPostTab(self)
|
||||||
self:selectTab(widget)
|
self:selectTab(widget)
|
||||||
updateTabs(self)
|
|
||||||
else
|
else
|
||||||
|
if #self.preTabs > 0 then
|
||||||
|
for i = 1, #self.preTabs do
|
||||||
|
showPreTab(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:selectTab(self.tabs[1])
|
self:selectTab(self.tabs[1])
|
||||||
end
|
end
|
||||||
|
updateTabs(self)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -419,10 +425,16 @@ function UIMoveableTabBar:selectPrevTab()
|
||||||
if #self.preTabs > 0 then
|
if #self.preTabs > 0 then
|
||||||
local widget = showPreTab(self)
|
local widget = showPreTab(self)
|
||||||
self:selectTab(widget)
|
self:selectTab(widget)
|
||||||
updateTabs(self)
|
|
||||||
else
|
else
|
||||||
|
if #self.postTabs > 0 then
|
||||||
|
for i = 1, #self.postTabs do
|
||||||
|
showPostTab(self)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:selectTab(self.tabs[#self.tabs])
|
self:selectTab(self.tabs[#self.tabs])
|
||||||
end
|
end
|
||||||
|
updateTabs(self)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue