NotificationCenterHeaderViewModel
class NotificationCenterHeaderViewModel(val hasDismissibleNotifications: LiveData<Boolean>, dismissAllAction: () -> Unit, closeAction: () -> Unit)
View model for the notification center header. The view model contains the dismissAllAction that will be executed when the dismiss all button is clicked, and a closeAction that will be executed when the close button is clicked.
Parameters
hasDismissibleNotifications
Is true
if the notification center contains dismissible notifications. Can be used, for example, to control the visibility of the dismiss all button.
dismissAllAction
The action to perform when the dismiss all button is clicked.
closeAction
The action to perform when the close button is clicked.
Functions
Link copied to clipboard
Executes the closeAction.
Link copied to clipboard
Executes the dismissAllAction.