Commit 796e2432 authored by Camilo higuita's avatar Camilo higuita

init work on downloading cloud images when needed

parent b6b17e74
......@@ -49,7 +49,7 @@ void Cloud::formatList()
auto thumbnail = item[FMH::MODEL_KEY::THUMBNAIL];
item[FMH::MODEL_KEY::FAV] = QString("0");
item[FMH::MODEL_KEY::URL] = thumbnail;
item[FMH::MODEL_KEY::URL] = FMH::fileExists(thumbnail)? thumbnail : item[FMH::MODEL_KEY::PATH];
item[FMH::MODEL_KEY::SOURCE] = url;
item[FMH::MODEL_KEY::TITLE] = item[FMH::MODEL_KEY::LABEL];
}
......
......@@ -125,6 +125,7 @@ ItemDelegate
iconName: "image-x-generic"
size: Math.min(picSize, iconSizes.huge)
isMask: false
enabled: false
anchors.centerIn: parent
}
......@@ -173,6 +174,4 @@ ItemDelegate
}
}
}
}
......@@ -54,13 +54,12 @@ PixGrid
if(selectionMode)
PIX.selectItem(pixList.get(index))
else if(isMobile)
console.log(_cloudList.get(index).url)
VIEWER.open(_cloudList, index)
}
onDoubleClicked:
{
control.grid.currentIndex = index
//picClicked(index)
if(!isMobile)
VIEWER.open(_cloudList, index)
......
.import "../Pix.js" as PIX
.import "../../../db/Query.js" as Q
.import org.kde.mauikit 1.0 as Maui
function open(list, index)
{
......@@ -23,9 +23,11 @@ function openExternalPics(pics, index)
function view(index)
{
pixViewer.currentPicIndex = index
pixViewer.currentPic = pixViewer.model.list.get(pixViewer.currentPicIndex)
if(Maui.FM.isCloud(pixViewer.currentPic.url))
console.log("IS CLOUD IMAGE")
console.log("CURRENT PIC FAV", pixViewer.currentPic.fav)
pixViewer.currentPicFav = dba.isFav(pixViewer.currentPic.url)
root.title = pixViewer.currentPic.title
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment