TbSync icon indicating copy to clipboard operation
TbSync copied to clipboard

automatic sync option (feature request)

Open jdpipe opened this issue 4 years ago • 9 comments

Your environment

TbSync version: 2.12 (with Provider for Exchange ActiveSync 1.14) Thunderbird version: 68.8.0

Expected behavior

I installed TbSync and I expected local changes to be synced automatically, as soon as a local or remote change has been made.

The local system knows when changes have been made (as I can see in the TbSync settings dialog), so it should be 'pretty trivial' for the TbSync add-in to initiate a sync whenever a local change has been made, or eg after some short nominal delay, eg of 10 seconds. If this were being done, and assuming TB is the users primary calendar, then this might be enough, and it would be fine to have a much longer sync period, just to allow for remote changes that might have happened, eg via phone or webmail)

Perhaps another option would be for TbSync to synchronise whever Thunderbird is focussed after a period of inactivity, or something like that?

Actual behavior

The default behaviour is that I must manually request a sync. Or, I can set periodic sync, which seems like it will be inefficient with bandwidth.

May I also suggest that the new user is somehow encouraged to enable automatic (see above) as well as periodic sync when they first install the add-in? Otherwise the behaviour is not what most users would expect. This software only really becomes useful for everyday work, I feel, if automatic sync is enabled. I saw the bug discussion about this, and I understand the 'play it safe' idea, but it is still not what users would expect, I think.

Steps to reproduce

NA

PS I have tried davmail and OWL, and while both of them work well in certain ways, they both ultimately have annoying bugs that prevent effective day-to-day use. Hoping the TbSync is finally the one!!

To help resolving your issue, enable debug logging (TbSync Account Manager -> Help) and send me the debug.log via e-mail (use the title of your issue as subject of the email).

jdpipe avatar Jul 08 '20 06:07 jdpipe

Hello,

For my part, I find that it would be practical to be able to indicate, during the configuration of the account, if we want the synchronization to take place when Thunderbird is launched and when closing (two checkboxes, for example ... ).

In addition, yes, the possibility also to force, at any time, the synchronization directly in the contextual menu of the account (right click on the name of the address book and click on "synchronize" ...)

Thanks and congratulations for this excellent plugin which also gives me complete satisfaction! Regards,

Biblio25 avatar Aug 12 '20 20:08 Biblio25

+1

jackyohh avatar Dec 20 '20 15:12 jackyohh

+1 Thank you for TbSync (see donation). Works flawlessly on both my windows and Ubuntu machines.

Automatic sync would be great. I saw a comment somewhere that periodic sync is possible. That is better than 100% manual. But I did not find a periodic sync anywhere in TbSync options. Is it there?

piet8stevens avatar Jan 02 '21 19:01 piet8stevens

It would be very nice to have it to automatically push local changes (and then download server changes every x minutes). Also, I don't know if it is a bug, the Sync button in the Lightning interface does not trigger TbSync sync. It is quite confusing...

mconca-kube avatar Jan 21 '21 14:01 mconca-kube

This can be achieved by applying a simple patch:

--- a/content/modules/public.js	2021-04-09 10:56:18.577423576 +0200
+++ b/content/modules/public.js	2021-04-09 10:43:01.921486288 +0200
@@ -401,8 +401,11 @@ var FolderData = class {
       status = TbSync.getString("status." + this.getFolderProperty("status"), this.accountData.getAccountProperty("provider")).split("||")[0];
 
       switch (this.getFolderProperty("status").split(".")[0]) { //the status may have a sub-decleration
-        case "success":
         case "modified":
+          if (!this.isSyncing()) {
+            this.accountData.setAccountProperty("lastsynctime", 0);
+          }
+        case "success":
           try {
             status = status + ": " + this.targetData.targetName;
           } catch (e) {

This will trigger/schedule a sync within the next minute (*) after a change occurred if periodic synchronization is enabled (i.e. not set to 0).

(*) see this code part: https://github.com/jobisoft/TbSync/blob/5d6d032bded1e0e1a0da8dfe1c4631bcfaee7639/content/tbsync.jsm#L135-L142

fonic avatar Apr 09 '21 09:04 fonic

Can you turn this into a proper pull request? I will merge that. Thanks!

jobisoft avatar Apr 09 '21 09:04 jobisoft

@jobisoft: sure can, I didn't expect anyone would actually be interested ;) I'll create a pull request for this later today.

fonic avatar Apr 09 '21 09:04 fonic

Excellent. I am very happy about this. Of course I am interested. Thank you so much!

On April 9, 2021 11:28:40 AM GMT+02:00, fonic @.> wrote: @.: sure can, I didn't expect anyone would actually be

interested ;) I'll create a pull request for this later today.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/jobisoft/TbSync/issues/407#issuecomment-816552650

piet8stevens avatar Apr 09 '21 14:04 piet8stevens

Seems to work quite well, haven't had any issues with it thus far.

fonic avatar Apr 19 '21 19:04 fonic