diff --git a/src/controller/buffers.py b/src/controller/buffers.py index b7af62e..a3c569c 100644 --- a/src/controller/buffers.py +++ b/src/controller/buffers.py @@ -481,6 +481,25 @@ class communityBuffer(feedBuffer): print(self.group_info["counters"]) super(communityBuffer, self).get_items(*args, **kwargs) +class topicBuffer(feedBuffer): + + def create_tab(self, parent): + self.tab = home.topicTab(parent) + self.connect_events() + self.tab.name = self.name + 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): + pass + + def open_post(self, *args, **kwargs): + """ Opens the currently focused post.""" + post = self.get_post() + if post == None: + return + a = presenters.displayTopicPresenter(session=self.session, postObject=post, group_id=self.kwargs["group_id"], interactor=interactors.displayPostInteractor(), view=views.displayTopic()) + class audioBuffer(feedBuffer): """ this buffer was supposed to be used with audio elements but is deprecated as VK removed its audio support for third party apps."""