From 1806db5670766ff1aa1d9f505e2ae9822038e1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Wed, 23 Mar 2016 02:15:52 -0600 Subject: [PATCH] Fixed order for get-items when there are already loaded items in lists --- src/controller/buffers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/controller/buffers.py b/src/controller/buffers.py index 904c36a..77dc60e 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -46,7 +46,9 @@ class baseBuffer(object): if show_nextpage == False: if self.tab.list.get_count() > 0 and num > 0: 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: [self.insert(i) for i in self.session.db[self.name]["items"][:num]] else: @@ -124,7 +126,9 @@ class feedBuffer(baseBuffer): if show_nextpage == False: if self.tab.list.get_count() > 0 and num > 0: 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: [self.insert(i) for i in self.session.db[self.name]["items"][:num]]