def _account_operation(self, fn): if account.Account().is_logged_in(): fn() else: helper.show_error_dialog([ 'Failed to access account bookmarks. Please login if you have not already.' ])
def show_bookmark_list(self): if account.Account().is_logged_in(): from resources.lib.list_types.bookmarklist import BookmarkList self._show_list(BookmarkList()) else: helper.show_error_dialog([ 'Failed to access account bookmarks. Please login if you have not already.' ])
def account_login_logout(self): account.Account().log_in_or_out()
def toggle_bookmark(self): self._account_operation(account.Account().toggle_bookmark)
def remove_bookmark(self): self._account_operation(account.Account().remove_bookmark)
def add_bookmark(self): self._account_operation(account.Account().add_bookmark)