Esempio n. 1
0
def get_hidden_comments(post_id):
    """ Возвращает набор скрытых комментов для указанного поста.
        Это тоже надо бы закешировать.
    """
    url = PostInfo.hidden_comments_url(post_id)
    comments = VkontakteGroupNewsReader.get_hidden_comments(url)
    return comments
    
        
Esempio n. 2
0
    def OnShowHiddenButton(self, event):
        post_id = event.EventObject.Name.replace('btn_', '')
        post = self.vk.current_wall_posts.posts[post_id]

        #показываем или скрываем дополнительные комментарии
        if not post.hidden_replies_has_shown:
            post.hidden_replies_has_shown = True
            
            hidden_comments = VkontakteGroupNewsReader.get_hidden_comments(post.get_hide_comments_url())
            
            post.prepend_list_of_replies( hidden_comments )
        else:
            post.hidden_replies_has_shown = False
            post.remove_all_hidden_replies()

        self.draw_topics()