mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added 'full' support to all .prepareIndexForWrite(..) implementers...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
3deb743692
commit
84b02c8f7a
@ -931,11 +931,11 @@ module.Comments = core.ImageGridFeatures.Feature({
|
|||||||
//
|
//
|
||||||
// NOTE: this will skip the 'raw' comment field...
|
// NOTE: this will skip the 'raw' comment field...
|
||||||
['prepareIndexForWrite',
|
['prepareIndexForWrite',
|
||||||
function(res){
|
function(res, _, full){
|
||||||
var changed = this.changes == null
|
var changed = this.changes == null
|
||||||
|| this.changes.comments
|
|| this.changes.comments
|
||||||
|
|
||||||
if(changed && res.raw.comments){
|
if((full || changed) && res.raw.comments){
|
||||||
var comments = res.raw.comments
|
var comments = res.raw.comments
|
||||||
|
|
||||||
Object.keys(comments)
|
Object.keys(comments)
|
||||||
@ -1172,10 +1172,10 @@ module.FileSystemSaveHistory = core.ImageGridFeatures.Feature({
|
|||||||
// available.
|
// available.
|
||||||
// NOTE: 'loadIndex' will also drop any unsaved changes...
|
// NOTE: 'loadIndex' will also drop any unsaved changes...
|
||||||
['prepareIndexForWrite',
|
['prepareIndexForWrite',
|
||||||
function(res){
|
function(res, _, full){
|
||||||
var changed = this.changes == null || this.changes.comments
|
var changed = this.changes == null || this.changes.comments
|
||||||
|
|
||||||
if(changed){
|
if(full || changed){
|
||||||
var comments = res.raw.comments && res.raw.comments.save || {}
|
var comments = res.raw.comments && res.raw.comments.save || {}
|
||||||
|
|
||||||
// set the 'current' comment to the correct date...
|
// set the 'current' comment to the correct date...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user