Skip to content

Commit 396c128

Browse files
committed
Disable cache for list views
1 parent 1367cd3 commit 396c128

18 files changed

+44
-17
lines changed

app/qml/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ set(MM_QML
3131
components/MMListDrawer.qml
3232
components/MMListFooterSpacer.qml
3333
components/MMListMultiselectDrawer.qml
34+
components/MMListView.qml
3435
components/MMListSpacer.qml
3536
components/MMBusyIndicator.qml
3637
components/MMMessage.qml

app/qml/account/MMHowYouFoundUsPage.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ MMPage {
7171
width: parent.width
7272
height: parent.height
7373

74-
ListView {
74+
MMListView {
7575
id: listView
7676

7777
width: parent.width

app/qml/components/MMListDrawer.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ MMDrawer {
4343
}
4444
}
4545

46-
ListView {
46+
MMListView {
4747
id: listViewComponent
4848

4949
width: parent.width

app/qml/components/MMListMultiselectDrawer.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ MMDrawer {
8282
}
8383
}
8484

85-
ListView {
85+
MMListView {
8686
id: listViewComponent
8787

8888
width: parent.width

app/qml/components/MMListView.qml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/***************************************************************************
2+
* *
3+
* This program is free software; you can redistribute it and/or modify *
4+
* it under the terms of the GNU General Public License as published by *
5+
* the Free Software Foundation; either version 2 of the License, or *
6+
* (at your option) any later version. *
7+
* *
8+
***************************************************************************/
9+
10+
import QtQuick
11+
12+
//
13+
// Hot-fix for hotfix https://github.com/MerginMaps/mobile/issues/3417
14+
// Seems like there is some issue with cache in ListView
15+
//
16+
17+
ListView {
18+
19+
cacheBuffer: 0
20+
}

app/qml/components/MMToolbar.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Rectangle {
4141
// center the content
4242
x: __style.safeAreaLeft
4343

44-
ListView {
44+
MMListView {
4545
id: toolbar
4646

4747
onWidthChanged: root.recalculate()

app/qml/form/MMFormPage.qml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Page {
140140

141141
property int tabIndex: model.TabIndex // from the repeater
142142

143-
ListView {
143+
MMComponents.MMListView {
144144

145145
anchors {
146146
fill: parent
@@ -170,8 +170,14 @@ Page {
170170
opacity: 1 // invisible
171171
height: 20 * __dp
172172
}
173-
}
174173

174+
// boundsBehavior: Flickable.StopAtBounds
175+
// bottomMargin: 0
176+
177+
cacheBuffer: 0
178+
// 320 on macOS
179+
Component.onCompleted: console.log(" -> cache:", cacheBuffer)
180+
}
175181
}
176182
}
177183
}

app/qml/form/MMPreviewDrawer.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ Item {
205205

206206
visible: internal.showFields
207207

208-
ListView {
208+
MMComponents.MMListView {
209209
width: parent.width
210210
height: contentHeight
211211

app/qml/form/components/MMFeaturesListPageDrawer.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Drawer {
7373

7474
MMComponents.MMListSpacer { height: __style.spacing20 }
7575

76-
ListView {
76+
MMComponents.MMListView {
7777
id: listView
7878

7979
width: parent.width

app/qml/form/editors/MMFormGalleryEditor.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ MMPrivateComponents.MMBaseInput {
3030

3131
title: _fieldShouldShowTitle ? _fieldTitle : ""
3232

33-
inputContent: ListView {
33+
inputContent: MMComponents.MMListView {
3434
id: rowView
3535

3636
width: parent.width

0 commit comments

Comments
 (0)