Fixed order for get-items when there are already loaded items in lists
This commit is contained in:
parent
4df86aa8a4
commit
1806db5670
@ -46,7 +46,9 @@ class baseBuffer(object):
|
|||||||
if show_nextpage == False:
|
if show_nextpage == False:
|
||||||
if self.tab.list.get_count() > 0 and num > 0:
|
if self.tab.list.get_count() > 0 and num > 0:
|
||||||
print "inserting a value"
|
print "inserting a value"
|
||||||
[self.insert(i, True) for i in self.session.db[self.name]["items"][:num]]
|
v = [i for i in self.session.db[self.name]["items"][:num]]
|
||||||
|
v.reverse()
|
||||||
|
[self.insert(i, True) for i in v]
|
||||||
else:
|
else:
|
||||||
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
|
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
|
||||||
else:
|
else:
|
||||||
@ -124,7 +126,9 @@ class feedBuffer(baseBuffer):
|
|||||||
if show_nextpage == False:
|
if show_nextpage == False:
|
||||||
if self.tab.list.get_count() > 0 and num > 0:
|
if self.tab.list.get_count() > 0 and num > 0:
|
||||||
print "inserting a value"
|
print "inserting a value"
|
||||||
[self.insert(i, True) for i in self.session.db[self.name]["items"][-num:]]
|
v = [i for i in self.session.db[self.name]["items"][:num]]
|
||||||
|
v.reverse()
|
||||||
|
[self.insert(i, True) for i in v]
|
||||||
else:
|
else:
|
||||||
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
|
[self.insert(i) for i in self.session.db[self.name]["items"][:num]]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user