mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-06 19:14:57 +11:00
core/lazyloader: add activeAsync property
This commit is contained in:
parent
658f3cf411
commit
4db28fe725
2 changed files with 17 additions and 0 deletions
|
|
@ -88,6 +88,12 @@ void LazyLoader::setActive(bool active) {
|
|||
}
|
||||
}
|
||||
|
||||
void LazyLoader::setActiveAsync(bool active) {
|
||||
if (active == (this->targetActive || this->targetLoading)) return;
|
||||
if (active) this->setLoading(true);
|
||||
else this->setActive(false);
|
||||
}
|
||||
|
||||
QQmlComponent* LazyLoader::component() const {
|
||||
return this->cleanupComponent ? nullptr : this->mComponent;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue