modal: possibility to enable closing

This commit is contained in:
ardocrat 2024-05-19 10:15:25 +03:00
parent a6723d093c
commit 7319c1b4eb

View file

@ -80,6 +80,11 @@ impl Modal {
self.closeable.store(false, Ordering::Relaxed);
}
/// Enable possibility to close [`Modal`].
pub fn enable_closing(&self) {
self.closeable.store(true, Ordering::Relaxed);
}
/// Check if [`Modal`] is closeable.
pub fn is_closeable(&self) -> bool {
self.closeable.load(Ordering::Relaxed)