Commit a1685a04 authored by Camilo higuita's avatar Camilo higuita

order by updated date

parent 63d59e90
......@@ -153,7 +153,7 @@ bool DBActions::removeNote(const QVariantMap &note)
QVariantList DBActions::getNotes()
{
return this->get("select * from notes");
return this->get("select * from notes order by updated asc");
}
QVariantList DBActions::getNoteTags(const QString &id)
......
......@@ -78,7 +78,7 @@ ItemDelegate
Layout.alignment: Qt.AlignLeft
Layout.fillWidth: true
text: Qt.formatDateTime(new Date(model.addDate), "d MMM h:mm")
text: Qt.formatDateTime(new Date(model.updated), "d MMM h:mm")
color: Qt.darker(model.color)
elide: Qt.ElideRight
wrapMode: TextEdit.WrapAnywhere
......@@ -198,5 +198,6 @@ ItemDelegate
model.color = item.color
model.pin = item.pin ? 1 : 0
model.fav = item.fav ? 1 : 0
model.updated = item.updated
}
}
......@@ -252,7 +252,8 @@ Maui.Popup
color: selectedColor,
tag: tagBar.getTags(),
pin: pinButton.checked,
fav: favButton.checked
fav: favButton.checked,
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