Skip to content

Conversation

@sunkup
Copy link
Member

@sunkup sunkup commented Jan 15, 2026

Part of refactoring synctools tasks.

Required for bitfireAT/davx5-ose#1934 .

For reference only: Similar AndroidCalendar changes are made in #28

@sunkup sunkup changed the title [WIP] [WIP] Move logic from DmfsTaskList companion object to DmfsTaskListProvider Jan 15, 2026
@sunkup sunkup self-assigned this Jan 15, 2026
@sunkup sunkup added the refactoring Quality improvement of existing functions label Jan 15, 2026
@sunkup sunkup force-pushed the move-logic-from-dmfstasklist-companion-object-to-dmfstasklist-provider branch from df3c10c to 28e7369 Compare January 19, 2026 12:44
@sunkup sunkup changed the title [WIP] Move logic from DmfsTaskList companion object to DmfsTaskListProvider Move logic from DmfsTaskList companion object to DmfsTaskListProvider Jan 19, 2026
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are unoptimized imports. Looks good otherwise on the first glance!

@sunkup sunkup force-pushed the move-logic-from-dmfstasklist-companion-object-to-dmfstasklist-provider branch from 6adf714 to 4f64f5e Compare January 20, 2026 12:42
@sunkup sunkup force-pushed the move-logic-from-dmfstasklist-companion-object-to-dmfstasklist-provider branch from 4f64f5e to 477fba0 Compare January 20, 2026 13:40
@sunkup sunkup marked this pull request as ready for review January 20, 2026 14:51
@sunkup sunkup requested a review from a team as a code owner January 20, 2026 14:51
@sunkup
Copy link
Member Author

sunkup commented Jan 20, 2026

Ok. Ready for review. Please pay close attention to the uri helper methods. That is: "tasksUri", "taskListUri", etc. I found those a tad confusing ...

@sunkup sunkup requested a review from rfc2822 January 20, 2026 14:56
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception handling: sometimes we have a try/catch Exception (with re-throw to LocalStorageException), sometimes try/catch RemoteException, and sometimes no try/catch.

I think synctools should make sure that every call throws a LocalStorageException in case of errors, but not a RemoteException. So I'd catch RemoteException on all provider operations and use it as the cause of the LocalStorageException.


Generally, how do you want to handle tests? Always have almost-complete tests in every PR or do you want to migrate the architecture first and then, as soon as a class is "as it should be", make sure that all its tests are written?

@sunkup
Copy link
Member Author

sunkup commented Jan 21, 2026

Generally, how do you want to handle tests? Always have almost-complete tests in every PR or do you want to migrate the architecture first and then, as soon as a class is "as it should be", make sure that all its tests are written?

I would usually want to go by the first approach, but in this case, since I feel there is a certain pressure to be done soon with the rewrite, I'd add the tests when all else is done.

Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't check everything in detail but looks good!

@github-project-automation github-project-automation bot moved this from Todo to In Progress in DAVx⁵ Releases Jan 21, 2026
@sunkup sunkup merged commit 25b92ef into main Jan 21, 2026
7 checks passed
@sunkup sunkup deleted the move-logic-from-dmfstasklist-companion-object-to-dmfstasklist-provider branch January 21, 2026 11:11
@github-project-automation github-project-automation bot moved this from In Progress to Done in DAVx⁵ Releases Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Quality improvement of existing functions

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants