orgzly / orgzly-android

Outliner for taking notes and managing to-do lists
https://www.orgzly.com
GNU General Public License v3.0
2.7k stars 304 forks source link

Add option to delete notebook if linked file gets deleted #918

Open funsafe-math opened 2 years ago

funsafe-math commented 2 years ago

A fix for #287

yamanq commented 2 years ago

Tested on Android 11, works. Thanks!

brendonscript commented 2 years ago

Will this ever be merged @nevenz ? This is a big issue keeping a lot of people from using Orgzly

xeruf commented 1 year ago

Unfortunately some restructuting has happened, raising big conflicts around here :/

Itrekr commented 1 year ago

Is there any indication if this is going to get implemented within the foreseeable future? It's really annoying that it's impossible to delete notebooks remotely because orgzly will just re-upload them automatically when it can't find them on the remote server.

mxxivcz commented 1 year ago

it's impossible to delete notebooks remotely

It is now possible to delete a notebook by switching all but one of the devices to plane mode and then deleting the notebook on each of the devices.

Itrekr commented 1 year ago

it's impossible to delete notebooks remotely

It is now possible to delete a notebook by switching all but one of the devices to plane mode and then deleting the notebook on each of the devices.

True @ajtakrajta, but that is rather cumbersome if you have to delete a large amount of files. For example, in my workflow I create daily notes which should be disposable. I have a function in Emacs that lets me go through those files and delete them if I no longer need them, and keep them if I do. This can easily be up to 10 files if I do this once every two weeks or so. That means I'll have to carefully select each and every one of those files on my mobile device just so they don't get re-uploaded automatically when I've deleted them on my pc.

The logical solution for dealing with such conflicts would just be to somehow log the list of note files that orgzly finds in the directory, if, during a sync it can't find one of the notes it previously had, either remove the local note or mark them as a conflict and let the user resolve them.

ugurbolat commented 1 year ago

Just a ping.

danielkrajnik commented 1 year ago

+1 I hate just repeating what others said, but it's impossible to use Orgzly when it keeps recreating deleted files.

MyFedora commented 1 year ago

Unfortunately some restructuting has happened, raising big conflicts around here :/

No not really.

I built an apk based on the most recent commit and the changes already, but I'm new to Orgzly, so I didn't verify whether it works yet.

Edit: Yep, works. When I delete org files from a device, Orgzly also deletes the notebook. Here's the patch: Add-option-to-delete-notebook-if-linked-file-gets-deleted.patch.txt. Remove .txt from the end of the file name.

colonelpanic8 commented 1 year ago

@tadeuszk733 Would you be interested in trying to merge this into the community fork at

https://github.com/orgzly-community/orgzly-android

I might consider doing it myself if you think its in a good enough state that it should be merged. WDYT?

colonelpanic8 commented 1 year ago

@tadeuszk733 as far as I can tell, this doesn't handle the case of two way sync. Is that correct?