Split the avatar images into a seperate cache
This commit is contained in:
parent
f298fe7f61
commit
fde3a7cdec
5 changed files with 16 additions and 6 deletions
|
@ -57,7 +57,7 @@ Container {
|
|||
NetImageTracker {
|
||||
id: tracker
|
||||
source: (postitem.ListItem.view.hideAvatar()) ? "" : ListItemData.user.content.avatar_image.link
|
||||
manager: postitem.ListItem.view.listImageManager
|
||||
manager: postitem.ListItem.view.userImageManager
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ NavigationPane {
|
|||
ListView {
|
||||
id: streamView
|
||||
property variant listImageManager: feedImageManager
|
||||
property variant userImageManager: userImageManager
|
||||
property bool fetching: false
|
||||
dataModel: ArrayDataModel {
|
||||
id: postModel
|
||||
|
@ -161,6 +162,10 @@ NavigationPane {
|
|||
id: feedImageManager
|
||||
cacheId: "feedImageManager"
|
||||
cacheSize: 250
|
||||
},
|
||||
NetImageManager {
|
||||
id: userImageManager
|
||||
cacheId: "userImageManager"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ Page {
|
|||
ListView {
|
||||
id: threadView
|
||||
property variant listImageManager: feedImageManager
|
||||
property variant userImageManager: userImageManager
|
||||
dataModel: ArrayDataModel {
|
||||
id: threadModel
|
||||
}
|
||||
|
@ -88,6 +89,10 @@ Page {
|
|||
id: feedImageManager
|
||||
cacheId: "feedImageManager"
|
||||
cacheSize: 250
|
||||
},
|
||||
NetImageManager {
|
||||
id: userImageManager
|
||||
cacheId: "userImageManager"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ void NetImageTracker::onImageReady(const QString filePath, const QString imageNa
|
|||
if (imageName.compare(mSource) == 0) {
|
||||
if (imageName.compare("loading") == 0) {
|
||||
// If we don't have an image to display, let's display a loading image
|
||||
QUrl url = QUrl("asset:///images/ca_rss_unread.png");
|
||||
QUrl url = QUrl("asset:///icons/ic_doctype_picture.png");
|
||||
setImageSource(url);
|
||||
} else {
|
||||
// Set the path to the image that is now downloaded and cached in the data folder on the device.
|
||||
|
|
|
@ -223,22 +223,22 @@
|
|||
<context>
|
||||
<name>StreamTab</name>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="170"/>
|
||||
<location filename="../assets/StreamTab.qml" line="175"/>
|
||||
<source>New Post</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="184"/>
|
||||
<location filename="../assets/StreamTab.qml" line="189"/>
|
||||
<source>To Top</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="212"/>
|
||||
<location filename="../assets/StreamTab.qml" line="217"/>
|
||||
<source>To Bottom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../assets/StreamTab.qml" line="199"/>
|
||||
<location filename="../assets/StreamTab.qml" line="204"/>
|
||||
<source>Reload</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
|
Reference in a new issue