mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-05-11 23:09:42 -04:00
fix(Settings): Update card registration logic to fix binded crash
This commit is contained in:
@@ -55,12 +55,16 @@ StyledRect {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (settingKey) {
|
||||
let flickable = findParentFlickable();
|
||||
if (flickable) {
|
||||
SettingsSearchService.registerCard(settingKey, root, flickable);
|
||||
}
|
||||
}
|
||||
if (!settingKey)
|
||||
return;
|
||||
var key = settingKey;
|
||||
Qt.callLater(() => {
|
||||
if (!root.parent)
|
||||
return;
|
||||
var flickable = findParentFlickable();
|
||||
if (flickable)
|
||||
SettingsSearchService.registerCard(key, root, flickable);
|
||||
});
|
||||
}
|
||||
|
||||
Component.onDestruction: {
|
||||
|
||||
Reference in New Issue
Block a user