Fix freeze on the second activation of screen sharing, when there are no permissions.

This commit is contained in:
Julien Wadel 2025-03-11 15:33:24 +01:00
parent f34bfdf118
commit 5145657aa9

View file

@ -120,17 +120,15 @@ void PreviewManager::unsubscribe(QObject *sender) {
}
void PreviewManager::activate() {
App::postModelBlock([]() {
App::postModelAsync([]() {
lDebug() << "[PreviewManager] Activation";
CoreModel::getInstance()->getCore()->enableVideoPreview(true);
CoreModel::getInstance()->getCore()->iterate();
});
}
void PreviewManager::deactivate() {
App::postModelBlock([]() {
App::postModelAsync([]() {
lDebug() << "[PreviewManager] Deactivation";
CoreModel::getInstance()->getCore()->enableVideoPreview(false);
CoreModel::getInstance()->getCore()->iterate();
});
}