From bd3ac7b9c13d5ba8296beded4c3c7d159f4656cd Mon Sep 17 00:00:00 2001 From: Brahim Hadriche Date: Thu, 27 Feb 2025 20:16:58 -0500 Subject: [PATCH] App dialog signals to comply with certification --- CHANGELOG.md | 4 ++++ playlet-lib/src/components/MainScene.bs | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fcee105..f514c4fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +- Nothing worth mentioning yet. + ## [0.36.2] - 2025-02-28 ### Added diff --git a/playlet-lib/src/components/MainScene.bs b/playlet-lib/src/components/MainScene.bs index 49806448..237fd916 100644 --- a/playlet-lib/src/components/MainScene.bs +++ b/playlet-lib/src/components/MainScene.bs @@ -54,8 +54,8 @@ function StartWebServer() m.dialServer@.StartServer() end function -function ShowAnnouncement() - DialogUtils.ShowDialogOnce({ +function ShowAnnouncement() as void + dialog = DialogUtils.ShowDialogOnce({ messageId: "1736288537" title: "Announcement - Playlet backend" message: [ @@ -68,4 +68,15 @@ function ShowAnnouncement() alwaysOnTop: true marginWidth: 180 }) + + if dialog = invalid + return + end if + + m.scene.signalBeacon("AppDialogInitiate") + m.top.observeField("wasClosed", FuncName(OnAnnouncementDialogClosed)) +end function + +function OnAnnouncementDialogClosed() + m.scene.signalBeacon("AppDialogComplete") end function