diff --git a/node_modules/user.js b/node_modules/user.js index 34a1d4b0..03af248c 100644 --- a/node_modules/user.js +++ b/node_modules/user.js @@ -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); diff --git a/public/langs/en-us.js b/public/langs/en-us.js index c40f2e74..8dd87f15 100644 --- a/public/langs/en-us.js +++ b/public/langs/en-us.js @@ -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 ?" } \ No newline at end of file diff --git a/public/langs/zh-cn.js b/public/langs/zh-cn.js index 09185c64..eed852a9 100644 --- a/public/langs/zh-cn.js +++ b/public/langs/zh-cn.js @@ -263,7 +263,7 @@ "More...": "更多", "Force full sync": "强制全量同步", - "ForceFullSyncMsg": "强制全量同步会从服务器上同步所有数据, 可能耗时比较久, 你确定?", + "ForceFullSyncMsg": "强制全量同步会先将该帐户的本地数据全部删除(包括数据库, 图片和附件), 然后从服务器上同步所有数据, 你确定?", "Are you sure to delete it ?": "确定删除?", "Are you sure ?": "你确定执行该操作?", diff --git a/public/langs/zh-hk.js b/public/langs/zh-hk.js index f7a027d6..486dce54 100644 --- a/public/langs/zh-hk.js +++ b/public/langs/zh-hk.js @@ -263,7 +263,7 @@ "More...": "更多", "Force full sync": "強制全量同步", - "ForceFullSyncMsg": "強制全量同步會從服務器上同步所有數據, 可能耗時比較久, 妳確定?", + "ForceFullSyncMsg": "強制全量同步會先將該帳戶的本地數據全部刪除(包括數據庫, 圖片和附件), 然後從服務器上同步所有數據, 妳確定?", "Are you sure to delete it ?": "確定刪除?", "Are you sure ?": "妳確定執行該操作?",