tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-15 04:40:43 +03:00
parent 1a626b4f5a
commit 3deb743692
2 changed files with 4 additions and 4 deletions

View File

@ -469,13 +469,13 @@ module.Sort = core.ImageGridFeatures.Feature({
}], }],
['prepareIndexForWrite', ['prepareIndexForWrite',
function(res){ function(res, _, full){
var c = this.changes var c = this.changes
var save = function(attr){ var save = function(attr){
if((c == null || c[attr]) && res.raw[attr]){ if((full || c == null || c[attr]) && res.raw[attr]){
// full save... // full save...
if(c == null){ if(full || c == null){
res.index[attr] = res.raw[attr] res.index[attr] = res.raw[attr]
// build diff... // build diff...

View File

@ -764,7 +764,6 @@ function(){
// currently I'm for the second option... // currently I'm for the second option...
// //
// XXX move this to a better spot... // XXX move this to a better spot...
// XXX make this merge if we locate more than one index...
var buildIndex = var buildIndex =
module.buildIndex = function(index, base_path){ module.buildIndex = function(index, base_path){
var res = {} var res = {}
@ -796,6 +795,7 @@ module.buildIndex = function(index, base_path){
// buildup the data object... // buildup the data object...
// NOTE: this is mostly to attach stuff that is stored in separate files... // NOTE: this is mostly to attach stuff that is stored in separate files...
// XXX move this to tags/marks/bookmarks...
// .tags + bookmarks + selection... // .tags + bookmarks + selection...
d.tags = index.tags || {} d.tags = index.tags || {}
d.tags.bookmark = index.bookmarked ? index.bookmarked[0] : [] d.tags.bookmark = index.bookmarked ? index.bookmarked[0] : []