added 'full' support to all .prepareIndexForWrite(..) implementers...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-02-15 04:45:55 +03:00
parent 3deb743692
commit 84b02c8f7a

View File

@ -931,11 +931,11 @@ module.Comments = core.ImageGridFeatures.Feature({
//
// NOTE: this will skip the 'raw' comment field...
['prepareIndexForWrite',
function(res){
function(res, _, full){
var changed = this.changes == null
|| this.changes.comments
if(changed && res.raw.comments){
if((full || changed) && res.raw.comments){
var comments = res.raw.comments
Object.keys(comments)
@ -1172,10 +1172,10 @@ module.FileSystemSaveHistory = core.ImageGridFeatures.Feature({
// available.
// NOTE: 'loadIndex' will also drop any unsaved changes...
['prepareIndexForWrite',
function(res){
function(res, _, full){
var changed = this.changes == null || this.changes.comments
if(changed){
if(full || changed){
var comments = res.raw.comments && res.raw.comments.save || {}
// set the 'current' comment to the correct date...