From b5aff6a8eb9653e40a9c7bd8a2a78d26f7c2b22f Mon Sep 17 00:00:00 2001 From: Manuel Cortez Date: Tue, 26 Feb 2019 09:02:18 -0600 Subject: [PATCH] display document type properly in buffers --- src/controller/buffers.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controller/buffers.py b/src/controller/buffers.py index 210bdb8..1859a33 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -513,6 +513,14 @@ class documentBuffer(feedBuffer): if hasattr(self, "can_post") and self.can_post == False and hasattr(self.tab, "post"): self.tab.post.Enable(False) + def onFocus(self, *args,**kwargs): + post = self.get_post() + if post == None: + return + original_date = arrow.get(post["date"]) + created_at = original_date.humanize(locale=languageHandler.curLang[:2]) + self.tab.list.list.SetItem(self.tab.list.get_selected(), 4, created_at) + def connect_events(self): super(documentBuffer, self).connect_events() # Check if we have a load button in the tab, because documents community buffers don't include it.