mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-15 15:41:19 +00:00
全量同步会先删除本地所有数据, 再重新同步
This commit is contained in:
10
node_modules/user.js
generated
vendored
10
node_modules/user.js
generated
vendored
@@ -378,8 +378,12 @@ User = {
|
||||
// 设为-1, 再刷新就会重新同步
|
||||
fullSyncForce: function(callback) {
|
||||
var me = this;
|
||||
db.users.update({UserId: me.getCurActiveUserId()}, {$set: {LastSyncUsn: -1}}, function() {
|
||||
callback && callback();
|
||||
var userId = me.getCurActiveUserId();
|
||||
db.users.update({UserId: userId}, {$set: {LastSyncUsn: -1}}, function() {
|
||||
// 删除本地账户所有数据
|
||||
me.deleteUserAllData(userId, function () {
|
||||
callback && callback();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
@@ -530,7 +534,7 @@ User = {
|
||||
// 1. 删除附件,图片
|
||||
me.deleteUserImagesAndAttachsPath(userId);
|
||||
|
||||
// 3. 删除其它表
|
||||
// 2. 删除数据库
|
||||
// 如果有自己独立的表, 则把文件夹删除即可
|
||||
if (userInfo.HasDB) {
|
||||
var dbPath = me.getUserDBPath(userId);
|
||||
|
@@ -184,5 +184,5 @@
|
||||
"Tag": "Tag",
|
||||
"Starred": "Starred",
|
||||
|
||||
"ForceFullSyncMsg": "Full sync will load all data from server, are you sure ?"
|
||||
"ForceFullSyncMsg": "Full sync will remove the current account's all local data (includes database, images and attachments) and load all data from server, are you sure ?"
|
||||
}
|
@@ -263,7 +263,7 @@
|
||||
|
||||
"More...": "更多",
|
||||
"Force full sync": "强制全量同步",
|
||||
"ForceFullSyncMsg": "强制全量同步会从服务器上同步所有数据, 可能耗时比较久, 你确定?",
|
||||
"ForceFullSyncMsg": "强制全量同步会先将该帐户的本地数据全部删除(包括数据库, 图片和附件), 然后从服务器上同步所有数据, 你确定?",
|
||||
|
||||
"Are you sure to delete it ?": "确定删除?",
|
||||
"Are you sure ?": "你确定执行该操作?",
|
||||
|
@@ -263,7 +263,7 @@
|
||||
|
||||
"More...": "更多",
|
||||
"Force full sync": "強制全量同步",
|
||||
"ForceFullSyncMsg": "強制全量同步會從服務器上同步所有數據, 可能耗時比較久, 妳確定?",
|
||||
"ForceFullSyncMsg": "強制全量同步會先將該帳戶的本地數據全部刪除(包括數據庫, 圖片和附件), 然後從服務器上同步所有數據, 妳確定?",
|
||||
|
||||
"Are you sure to delete it ?": "確定刪除?",
|
||||
"Are you sure ?": "妳確定執行該操作?",
|
||||
|
Reference in New Issue
Block a user