stefan-niedermann / nextcloud-deck

πŸ“‹ Android client for nextcloud deck app

Home Page:https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a button to force sync all upcoming due cards / all cards on all boards

ahcheing opened this issue Β· comments

Please use GitHub reactions πŸ‘ to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Is your feature request related to a problem? Please describe.

It takes way to long for changes to sync from the server to the app when cards are rescheduled via the API.

Currently, if I reschedual a due date with the api, the only / fastest way to reflect that change in the app is to wait 15 minutes and hope that the app updates in the background (which it very, very often does not do for reasons I cant quite figure out). Otherwise the only way to refresh the app is to try to find every single list where I know a change was made by the api, add a new card to the list with the title "delme" (I have a cron job setup to periodically delete all cards with "delme" in the title), then swipe down and wait for that one list on that one board to properly refresh. Then go on to the next one. then the next. getting more annoyed each time.

This is a big problem since I use tasker + some janky pytjon scripts to do bulk card modification / editing. To give my most used example, lets say that I see that I have 40+ cards due today (which happens freqyently). Thats to many tasks to fit in a day, so I click a tasker icon to fire a python script on my server which uses the deck api to reschedual to tomorow all cards with the "low" label.

But I might as well not bother, because its faster to just manually modify them in the deck app. As to why I dont just do that, because Its a boring, tedious, repetitive chore that takes 5-10 minutes very early in the morning when I am not properly cafinated so it feels like it takes 100 minutes, and it makes me stupidly angry, since I spent a not-insignificant amount of free time trying to figure out how to kludge together a python script to automated the process, and I dont know the first thing about programming, I just want to make it easier to update my task list.

Describe the solution you'd like

There should be a button i can press to force the app to sync all of the cards in the "upcoming cards" view.

Better yet, button to press to force the app to sync all the boards and all the cards. Although that might be to slow or something.

Describe alternatives you've considered

Its probably more difficult to implement, but a way of bulk editing cards within the app would be great. IE, select multiple cards, then click a clock button to reschedual all of the selected cards.

Pull to refresh?

Pull to refresh?

Pull to refresh does not work for changes made with my python script. In order to update the displayed card in that list, I have to add a card to that list specificially, then swipe down, and only then will that specific list of cards be updated to reflect changes made with api. No other lists / cards get updated.

behavior is unique to cards updated with api, so if I open firefox and update the due date of a card, the change is reflected in deck either right away or with a pull to refresh, so its very possible I'm borking something up with my python script.

Would posting some of the python from the script be helpful? Its based on this python import-export script, which I modified so that rather then creating a whole new series of boards/cards it updates the due date of all cards with a given tag.

In fact, pull to refresh does synchronize everything. It works that quick because we can check with ETags what actually changed.

If you disable ETags in the Deck Android apps preferences, you will notice that a resync will take way longer because we actually transfer all the data again.

The Deck server app however unfortunately has some known issues when it should update the ETags, so clients arent't able to notice a change. This works for boards and cards, but especially when it comes to lists, you might stumble upon those issues.

It would be helpful if you could verify that with disabled ETags Pull to refresh works as expected, please.

I do use etags, and at least according to my notes the last time I tried to debug this (several months / versions of the app ago) this does not fix the issue. But, since you posted your comment I've flipped that particular switch, and I am still waiting for the app to finish syncing / stop crashing. This is not terribly surprising, because i know doing the initial sync after uninstalling / reinstalling the app or when I delete the app data takes a very long time and involves many many crashes, since I have 20+ boards and several hundred / thousand cards (I know deck app not designed for this, but deck app is best option for my use case nevertheless. blame the tasks app for its cluttered UI and its lack of of necessary functionality like assigning people and the ability to associate a task with a project, or most importantly ability to quickly add a links to files from the file ui without having to copy paste links into the "notes" section for every single task that references an otherwise terribly difficult to find file)

I'll update this comment / thread if / when I get the app to sync. I wonder if there is a way to force update the etag via my python script? filing that away as something to tinker with later.

After closing down every other running app to give deck more memory to work with and then trying to sync, I can confirm that one of the cards on one of the lists that changed via api was updated in the app itself.

But that also happens if enough time passes when etags are enabled if enough time passes, so not really definitive test.

I've also confirmed that the etags do actually update when I run the python script. or at least, I run curl to check an etag, copy paste it, run the script to update the due date, then check with curl again, and the etag has been updated. so at least in that one specific case my script is not breaking the tag.

Since I dont really have spare tiome today to tinker with this more I'm going to give it another try this weekend to try to narrow down the bug.

Given this issue is quite old: Are you still working on it? I currently can still see a decision between plague or cholera:

Solution 1: Fix the ETag issues of the Deck server app (Just search their repository, there are plenty of them πŸ™)
Solution 2: Go ahead with disabled ETags - which can take very much time by design (given we ensure offline capabilities, we synchronize the whole data of the current account)

Closing due to missing response. Please feel free to reopen the issue, otherwise referencing to my last comment.