summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorniko <niko>2012-10-21 12:17:43 (GMT)
committerniko <niko>2012-10-21 12:17:43 (GMT)
commiteaca0119bdadb63986fc3525ee2bebd6a4c140ec (patch)
tree39a5f7c6368d093a83043da2d18a652c8dc9e866
parent529d1b4304aa3bd87414c28ffaeae0b19a44f0f2 (diff)
downloadsynckolab-eaca0119bdadb63986fc3525ee2bebd6a4c140ec.tar.gz
fix for #25183: make sure folder is up-to-date before parsing
-rw-r--r--src/chrome/content/synckolab/addressbookTools.js3
-rw-r--r--src/chrome/content/synckolab/synckolab.js32
2 files changed, 26 insertions, 9 deletions
diff --git a/src/chrome/content/synckolab/addressbookTools.js b/src/chrome/content/synckolab/addressbookTools.js
index 84fea31..6f9a778 100644
--- a/src/chrome/content/synckolab/addressbookTools.js
+++ b/src/chrome/content/synckolab/addressbookTools.js
@@ -75,6 +75,7 @@ synckolab.addressbookTools = {
// fix from syncgb
if (card.isMailList && !card.getProperty) {
switch (prop) {
+ // really old: cannot use uid field
case "uid":
case "UID":
case "Uid":
@@ -259,6 +260,7 @@ synckolab.addressbookTools = {
}
// for mailing lists
+ /*
if (card.isMailList) {
try {
// sk always uses dirName
@@ -272,6 +274,7 @@ synckolab.addressbookTools = {
throw err;
}
}
+ */
// we can use custom fields!!!
var uid = this.getCardProperty(card, "UUID");
diff --git a/src/chrome/content/synckolab/synckolab.js b/src/chrome/content/synckolab/synckolab.js
index 5cb3b82..6f81e7d 100644
--- a/src/chrome/content/synckolab/synckolab.js
+++ b/src/chrome/content/synckolab/synckolab.js
@@ -569,23 +569,37 @@ synckolab.main.prepareContent = function() {
// update folder information from imap and make sure we got everything
synckolab.main.gConfig.folder.updateFolder(msgWindow);
- // my UrlListener calls getContent
- synckolab.main.gConfig.folder.compact({
- OnStartRunningUrl: function ( url )
- {
- },
-
+
+ // two step refrsh: downloadAllForOflline -> then Compact
+ synckolab.main.gConfig.folder.downloadAllForOffline({
+ OnStartRunningUrl: function ( url ){},
OnStopRunningUrl: function ( url, exitCode )
{
- synckolab.tools.logMessage("Finished folder frefresh; ONSTOP="+exitCode+" : " + url, synckolab.global.LOG_DEBUG );
- synckolab.main.getContent();
+ synckolab.tools.logMessage("Finished folder download; ONSTOP="+exitCode+" : " + url, synckolab.global.LOG_DEBUG );
+
+ // compact: my UrlListener calls getContent
+ synckolab.main.gConfig.folder.compact({
+ OnStartRunningUrl: function (compactUrl){},
+ OnStopRunningUrl: function ( compactUrl, compactExitCode )
+ {
+ synckolab.tools.logMessage("Finished folder frefresh; ONSTOP="+compactExitCode+" : " + url, synckolab.global.LOG_DEBUG );
+ // clear new
+ synckolab.main.gConfig.folder.clearNewMessages();
+ // force update summary
+ synckolab.main.gConfig.folder.updateSummaryTotals(true);
+ // continue;
+ synckolab.main.getContent();
+ }
+ }, msgWindow); // this should take care of refreshes
+
}
- }, msgWindow); // this should take care of refreshes
+ }, msgWindow);
};
synckolab.main.syncKolabCompact = function() {
// update folder and compact - this prevents event triggereing
synckolab.main.gConfig.folder.updateFolder(msgWindow);
+
// compact folder
try {
synckolab.main.gConfig.folder.compact(null, null);