fix(streamer-mode): check setting on startup (#5236)

This commit is contained in:
nerix 2024-03-06 19:01:42 +01:00 committed by GitHub
parent 6bc34ca97a
commit 9151446c0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -170,7 +170,7 @@
- Dev: Added estimation for image sizes to avoid layout shifts. (#5192)
- Dev: Added the `launachable` entry to Linux AppData. (#5210)
- Dev: Cleaned up and optimized resources. (#5222)
- Dev: Refactor `StreamerMode`. (#5216)
- Dev: Refactor `StreamerMode`. (#5216, #5236)
- Dev: Cleaned up unused code in `MessageElement` and `MessageLayoutElement`. (#5225)
## 2.4.6

View file

@ -163,7 +163,6 @@ bool StreamerMode::isEnabled() const
StreamerModePrivate::StreamerModePrivate(StreamerMode *parent)
: parent_(parent)
{
this->thread_.start();
this->timer_.moveToThread(&this->thread_);
QObject::connect(&this->timer_, &QTimer::timeout, [this] {
auto timeouts =
@ -184,6 +183,11 @@ StreamerModePrivate::StreamerModePrivate(StreamerMode *parent)
});
},
this->settingConnections_);
QObject::connect(&this->thread_, &QThread::started, [this] {
this->settingChanged(getSettings()->enableStreamerMode.getEnum());
});
this->thread_.start();
}
bool StreamerModePrivate::isEnabled() const