Displaying articles from the attachments list in wall posts

This commit is contained in:
Manuel Cortez 2019-12-05 16:28:01 -06:00
parent 1ef8c99c43
commit c83f7c8d94
2 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,7 @@
* Socializer will ask for confirmation before closing the application. * Socializer will ask for confirmation before closing the application.
* In all audio buffers, there is a new item in the context menu that allows downloading of the audio directly from the buffer. If there are multiple audios selected, socializer will ask for a folder where all audios should be placed. When downloading multiple audios, socializer will name those automatically by following the template "song title - artist". * In all audio buffers, there is a new item in the context menu that allows downloading of the audio directly from the buffer. If there are multiple audios selected, socializer will ask for a folder where all audios should be placed. When downloading multiple audios, socializer will name those automatically by following the template "song title - artist".
* Added displaying of articles as attachments in wall posts. When opened, Socializer will open the article in the web browser.
### bugfixes ### bugfixes

View File

@ -350,6 +350,9 @@ class displayPostPresenter(base.basePresenter):
webbrowser.open_new_tab(url) webbrowser.open_new_tab(url)
elif attachment["type"] == "poll": elif attachment["type"] == "poll":
a = poll.displayPollPresenter(session=self.session, poll=attachment, interactor=interactors.displayPollInteractor(), view=views.displayPoll()) a = poll.displayPollPresenter(session=self.session, poll=attachment, interactor=interactors.displayPollInteractor(), view=views.displayPoll())
elif attachment["type"] == "article":
output.speak(_("Opening Article in web browser..."), True)
webbrowser.open_new_tab(attachment["article"]["url"])
else: else:
log.debug("Unhandled attachment: %r" % (attachment,)) log.debug("Unhandled attachment: %r" % (attachment,))