diff --git a/docs/images/modals_dynamic_notification.png b/docs/images/modals_dynamic_notification.png
new file mode 100644
index 000000000..bbc232f67
Binary files /dev/null and b/docs/images/modals_dynamic_notification.png differ
diff --git a/services/modals/src/lib.rs b/services/modals/src/lib.rs
index 962b14d9d..1588051cf 100644
--- a/services/modals/src/lib.rs
+++ b/services/modals/src/lib.rs
@@ -389,7 +389,7 @@ impl Modals {
///
/// Example Image
///
- /// 
+ /// 
///
///
///
@@ -428,7 +428,7 @@ impl Modals {
///
/// Example Image
///
- /// 
+ /// 
///
///
///
@@ -616,7 +616,7 @@ impl Modals {
///
/// Example Image
///
- /// 
+ /// 
///
///
///
@@ -692,7 +692,7 @@ impl Modals {
///
/// Example Image
///
- /// 
+ /// 
///
///
///
@@ -789,6 +789,37 @@ impl Modals {
}
}
+ /// Notification modal with title and text that can be updated.
+ /// - Modal cannot be dismissed by the user, you must close this dialog using `dynamic_notification_close`
+ /// - Burden is on the consumer to not exceed available space.
+ ///
+ ///
+ /// Example Image
+ ///
+ /// 
+ ///
+ ///
+ ///
+ /// # Example
+ /// ```
+ /// use modals::Modals;
+ /// use xous_names::XousNames;
+ /// let xns = XousNames::new().unwrap();
+ /// let modals = Modals::new(&xns).unwrap();
+ ///
+ /// modals
+ /// .dynamic_notification(Some("TITLE OF NOTIFICATION"), Some("Important details go here..."))
+ /// .unwrap();
+ /// /// do some stuff
+ /// modals
+ /// .dynamic_notification_update(
+ /// Some("Important update!"),
+ /// Some("We're almost there, please hold.."),
+ /// )
+ /// .unwrap();
+ /// /// do more stuff
+ /// modals.dynamic_notification_close().unwrap();
+ /// ```
pub fn dynamic_notification(&self, title: Option<&str>, text: Option<&str>) -> Result<(), xous::Error> {
self.lock();
let spec = DynamicNotification {
@@ -802,6 +833,8 @@ impl Modals {
Ok(())
}
+ /// - Calling this to update the dynamic_notification dialog is optional.
+ /// - See documentation for `dynamic_notification` for a code example.
pub fn dynamic_notification_update(
&self,
title: Option<&str>,
@@ -818,6 +851,8 @@ impl Modals {
Ok(())
}
+ /// - You must call this method to dismiss `dynamic_notification` when it is no longer needed.
+ /// - See documentation for `dynamic_notification` for a code example.
pub fn dynamic_notification_close(&self) -> Result<(), xous::Error> {
send_message(
self.conn,