fix waiting for image, should not await dialogManager.show

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-08-09 14:59:52 +08:00
parent a35635f4bb
commit 52bffd4030
3 changed files with 27 additions and 14 deletions

View File

@@ -345,6 +345,14 @@ impl FlutterHandler {
*self.notify_rendered.write().unwrap() = false;
self.renderer.write().unwrap().set_size(width, height);
}
pub fn on_waiting_for_image_dialog_show(&self) {
#[cfg(any(feature = "flutter_texture_render"))]
{
*self.notify_rendered.write().unwrap() = false;
}
// rgba array render will notify every frame
}
}
impl InvokeUiSession for FlutterHandler {

View File

@@ -1266,6 +1266,12 @@ pub fn session_change_prefer_codec(session_id: SessionID) {
}
}
pub fn session_on_waiting_for_image_dialog_show(session_id: SessionID) {
if let Some(session) = SESSIONS.read().unwrap().get(&session_id) {
session.ui_handler.on_waiting_for_image_dialog_show();
}
}
pub fn main_set_home_dir(_home: String) {
#[cfg(any(target_os = "android", target_os = "ios"))]
{