Commit 4fc86180 authored by Camilo higuita's avatar Camilo higuita

correct issues

parent aa546e13
......@@ -140,6 +140,8 @@ bool Links::update(const QVariantMap &data, const int &index)
if(this->update(newData))
{
qDebug() << "update link" << newData;
emit this->updateModel(index, roles);
return true;
}
......
......@@ -27,7 +27,7 @@ public slots:
QVariantMap get(const int &index) const override;
bool insert(const QVariantMap &link) override;
bool update(const int &index, const QVariant &value, const int &role) override; //deprecrated
bool update(const QVariantMap &data, const int &index);
bool update(const QVariantMap &data, const int &index) override;
bool update(const OWL::DB &link) override;
bool remove(const int &index) override;
......
......@@ -117,7 +117,7 @@ Maui.Page
Previewer
{
id: previewer
onLinkSaved: linksList.update(link)
onLinkSaved: linksList.update(link, linksView.currentIndex)
}
Links
......
......@@ -141,6 +141,7 @@ Maui.Dialog
function show(link)
{
console.log("STATE:" , link.fav)
webView.url = link.link
tagBar.populate(link.tags)
pinButton.checked = link.pin == 1
......@@ -151,13 +152,14 @@ Maui.Dialog
function packLink()
{
console.log(favButton.checked)
linkSaved({
title: webView.title,
link: webView.url,
color: colorBar.currentColor,
color: selectedColor,
tag: tagBar.getTags(),
pin: pinButton.checked,
fav: favButton.checked,
pin: pinButton.checked ? 1 : 0,
fav: favButton.checked ? 1 : 0,
updated: new Date()
})
}
......
......@@ -217,8 +217,8 @@ Maui.Page
target: cardsView.menu
onOpened:
{
cardsView.menu.isFav = currentNote.fav == 1 ? true : false
cardsView.menu.isPin = currentNote.pin == 1 ? true : false
cardsView.menu.isFav = currentNote.fav == 1
cardsView.menu.isPin = currentNote.pin == 1
}
onDeleteClicked: notesList.remove(cardsView.currentIndex)
......
......@@ -211,8 +211,8 @@ Maui.Dialog
body: editor.body.text,
color: selectedColor,
tag: tagBar.getTags(),
pin: pinButton.checked,
fav: favButton.checked,
pin: pinButton.checked ? 1 : 0,
fav: favButton.checked ? 1 : 0,
updated: new Date()
})
}
......
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