Posts: 31
Threads: 10
Joined: Jan 2024
Reputation:
0
I'm puzzeled: I want to swap an annotated PDF with a revised version and keep the annotations.
I tried importing a new PDF, but sometimes that results in a new song.
Then I tried swapping the PDF, but then the annotations disappear.
Is there a setting I for keeping the annotations during a swap of is there another way that I overlooked?
René
Posts: 394
Threads: 28
Joined: May 2019
Reputation:
12
If you just swap the file, the annotations should remain. At least at android.
You could try. To Make a copy from your song with annotations and swap the file there. But there should be no difference.
As a side note: you should swap the via the swap file dialog.
Long press a song -> press the three dots-> swap file.
If you swap the file with in the "file" dialog of the song you will loose your annotations.
Samsung Galaxy Tab S7 FE Android 12
Samsung Note Pro 12.2 LineageOS 14.1
Huawei Media Pad M3 lite Android 7
Posts: 13,308
Threads: 301
Joined: Apr 2012
Reputation:
234
Something definitely sounds like it's not working as intended if you switched off the option to sync annotations but your existing annotations were removed. I'll have to see if I can reproduce that.
Mike
Posts: 13,308
Threads: 301
Joined: Apr 2012
Reputation:
234
I just tested this and it worked fine:
1) I synchronized device 1 to a Dropbox folder
2) I synchronized device 2 to that same folder
3) I annotated one of the songs on device 2
4) I swapped a file for that same song on device 1
5) I synchronized the change to Dropbox
6) I synchronized the Dropbox folder to device 2 but unchecked "Sync annotations"
7) I loaded that song on device 2 and verified my annotations were still intact
So I'm going to need specific steps for reproducing this issue if you believe there is a bug.
Thanks,
Mike
Posts: 13,308
Threads: 301
Joined: Apr 2012
Reputation:
234
Is this on Windows, Android or iOS? I tested between Windows and Android, and it sounds like I did exactly what you did but it worked fine for me.
Thanks,
Mike
Posts: 13,308
Threads: 301
Joined: Apr 2012
Reputation:
234
So that is very different from swapping in a file with the same name. If you are swapping in a file with a new name, MobileSheets will interpret that on the other end as you deleting a file and replacing it with a new file. That's going to trigger a very different series of events on the secondary device, as it will first remove all of the pages associated with the old file, then copy over the pages for the new file from the other device. I'll have to review this logic to see if there is anything I can do to improve this, but if you replace 111_Test_1.pdf with 111_Test_1.pdf (instead of 111_Test_2.pdf), then you shouldn't encounter that problem.
I know from a user perspective, it seems like this should be a simple exchange and the annotations shouldn't be impacted. However, the synchronization feature is merging libraries and has to handle all sorts of potential situations with the types of changes the user may have made. So removing the old file and inserting the new file is how it handles a file change (it doesn't know that the swap file feature was used on the other devices - it just sees it as a new file replacing the old). There is a lot of logic when using the swap file feature that preserves things like annotations because it assumes this is the correct thing to do. With the sync library feature, it's not entirely clear if this is always the right thing to do. The user may have replaced the old file with a completely different file with different page sizes, and the annotations on the old pages might not even be valid on the new pages. Regardless, I'll probably have to try to insert additional logic to preserve annotations, and leave it up to the user to delete them if it wasn't the right thing to do to keep them.
Mike
Posts: 31
Threads: 10
Joined: Jan 2024
Reputation:
0
Hi Mike,
I completely understand what you mean.
I can understand both ways of thinking and how the 'receiving' side can't distinguish a swap from a replacement.
Maybe you could add a switch/flag on the Song-level in the swapping screen through which the user indicates whether the new file is a new version of the PDF of a new version of the song (or 'Synced devices must keep/remove annotations').
Maybe you could use that information in the sync logic where the code has to determine whether to keep or trash the annotations.
Something like: if a new PDF is found for this song: if Keep_annotations = true: keep annotations, else: delete annotations.
René