fix(view): lazily create nondefault thumbnail views#457
Conversation
Create nondefault thumbnail views on first selection and keep them loaded. 仅在首次选择时创建非默认缩略图视图,并在之后保持加载。 Log: 延后非默认缩略图视图与日视图的创建 Influence: 应用启动时间和首次切换各缩略图视图
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码逻辑已较为完善,无需额外修复,以下为确认后的核心逻辑:
diff --git a/src/qml/ThumbnailImageView/DeferredView.qml b/src/qml/ThumbnailImageView/DeferredView.qml
--- a/src/qml/ThumbnailImageView/DeferredView.qml
+++ b/src/qml/ThumbnailImageView/DeferredView.qml
@@ -5,16 +5,14 @@
Loader {
property int viewType: -1
property bool loadedOnce: false
anchors.fill: parent
asynchronous: false
active: loadedOnce || GStatus.currentViewType === viewType
onLoaded: loadedOnce = true
} |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pengfeixx, wyu71 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Create nondefault thumbnail views on first selection and keep them loaded. 仅在首次选择时创建非默认缩略图视图,并在之后保持加载。
Log: 延后非默认缩略图视图与日视图的创建
Influence: 应用启动时间和首次切换各缩略图视图