mirror of
https://github.com/leanote/desktop-app.git
synced 2025-12-13 02:01:56 +08:00
sync attach [ok]
todo conflicts copy attach
This commit is contained in:
9
node_modules/file.js
generated
vendored
9
node_modules/file.js
generated
vendored
@@ -162,13 +162,17 @@ var File = {
|
||||
},
|
||||
|
||||
// 笔记添加/修改后会有LocalFileId <=> FileId映射
|
||||
updateFileForce: function(files) {
|
||||
// 这个只对image有用
|
||||
updateImageForce: function(files) {
|
||||
if(!files) {
|
||||
// callback && callback(false);
|
||||
return;
|
||||
}
|
||||
for(var i in files) {
|
||||
var file = files[i];
|
||||
if(file.IsAttach) {
|
||||
continue;
|
||||
}
|
||||
if(!file.FileId || !file.LocalFileId) {
|
||||
continue;
|
||||
}
|
||||
@@ -207,6 +211,7 @@ var File = {
|
||||
Name: rename,
|
||||
UserId: User.getCurActiveUserId(),
|
||||
Title: name,
|
||||
IsDirty: true, // 先添加的肯定是dirty, 什么时候不是dirty ? sync 和 send changes后
|
||||
Type: ext,
|
||||
Size: fileStat && fileStat.size,
|
||||
IsDirty: true, // 本地是新添加的, ServerFileId = 0
|
||||
@@ -221,7 +226,7 @@ var File = {
|
||||
// 删除不存在的attachs
|
||||
deleteNotExistsAttach: function(noteId, attachs) {
|
||||
var me = this;
|
||||
console.log('--');
|
||||
// console.log('--');
|
||||
Attachs.find({NoteId: noteId}, function(err, everAttachs) {
|
||||
if(err) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user