perf(admin): unload admin panel when leaving it to preserve performance
Iterates #16043 By unloading the admin panel when leaving it, we can free the memory and also make sure that further updates to the community don't try to update the invisible models from the admins panels, some of which are very heavy.
This commit is contained in:
parent
b8c4dfac34
commit
7c1d047199
|
@ -234,8 +234,7 @@ StackLayout {
|
||||||
Loader {
|
Loader {
|
||||||
id: communitySettingsLoader
|
id: communitySettingsLoader
|
||||||
active: root.rootStore.chatCommunitySectionModule.isCommunity() &&
|
active: root.rootStore.chatCommunitySectionModule.isCommunity() &&
|
||||||
root.isPrivilegedUser &&
|
root.isPrivilegedUser && root.currentIndex === 1
|
||||||
(root.currentIndex === 1 || !!communitySettingsLoader.item) // lazy load and preserve state after loading
|
|
||||||
asynchronous: false // It's false on purpose. We want to load the component synchronously
|
asynchronous: false // It's false on purpose. We want to load the component synchronously
|
||||||
sourceComponent: CommunitySettingsView {
|
sourceComponent: CommunitySettingsView {
|
||||||
id: communitySettingsView
|
id: communitySettingsView
|
||||||
|
|
Loading…
Reference in New Issue