Skip to content

Button callback #48

@AndreyOrb

Description

@AndreyOrb

Currently, I have this line of code:
toast(title=mail_subject, body=mail_body_first_line, on_click=self.open_email)

I would like to add more functionality by adding buttons.

buttons = [
    {'activationType': 'background', 'arguments': 'Lalala', 'content': 'Read summary'}
]

toast(title="Subject", body=mail_body_first_line, on_click=self.open_email, buttons=buttons)

However, there is no documented example of how to run a function when a button is pressed.
Any help will be highly appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions