Ricki Hirner a8c8a8d2e0 Refactor SEQUENCE and UID handling on successful uploads (#1785)
* Define interfaces

* [WIP] Refactor sequence and UID handling in event uploads

- Refactor `generateUpload` method to return `GeneratedResource`.
- Update `SyncManager` to handle `GeneratedResource`.
- Implement sequence and UID management in `CalendarSyncManager`.
- Remove redundant `prepareForUpload` method from `LocalEvent`.

* Refactor sequence handling in uploads

- Move UID validation to `DavUtils.isGoodFileBaseName`
- Update sequence directly in iCalendar for group-scheduled events
- Rename `resourceBaseName` to `suggestedBaseName` for clarity

* Refactor sequence / UID handling in contact uploads

- Update `LocalAddress` interface to include `updateUid` method
- Modify `ContactsSyncManager` to handle UID generation and update
- Remove redundant UID handling in `LocalContact` and `LocalGroup`
- Adjust code style settings for right margin

* Remove redundant UID update from `ContactsSyncManager` and `CalendarSyncManager`

* Implement UID handling in `TasksSyncManager` for uploads

* Update JtxSyncManager

- Update `JtxSyncManager.kt` to implement the `generateUpload` function.
- Update `LocalJtxICalObject.kt` to include the `updateUid` method for updating UIDs in the collection.

* Remove deprecated `prepareForUpload` method from `LocalResource`

- Remove `prepareForUpload` implementations from `LocalContact`, `LocalEvent`, `LocalGroup`, and `LocalTask`

* Rename `isGoodFileBaseName` to `isGoodFileName` in `DavUtils`

* Fix tests

* Move UID generation logic to `DavUtils.generateUidIfNecessary`

- Use `DavUtils.fileNameFromUid` for generating file names
- Update `ContactsSyncManager`, `CalendarSyncManager`, `TasksSyncManager`, and `JtxSyncManager` to use new utility methods

* Add tests for DavUtils

* Some tests

* Refactor onSuccessfulUpload

* Update KDoc

* Logging

* Remove unnecessary LocalEvent method

* KDoc
2025-10-29 17:57:34 +01:00
2025-04-25 09:05:43 +02:00
2025-10-28 11:18:54 +01:00
2023-05-17 18:13:27 +02:00
2024-11-20 16:11:40 +01:00
2015-11-27 12:31:15 +01:00
2022-05-28 20:06:35 +02:00

Website F-Droid License Follow @davx5app@fosstodon.org Development tests

DAVx⁵ logo

DAVx⁵

Please see the DAVx⁵ Web site for comprehensive information about DAVx⁵, including a list of services it has been tested with.

DAVx⁵ is licensed under the GPLv3 License.

News and updates:

Help, feature requests, bug reports: DAVx⁵ discussions

Parts of DAVx⁵ have been outsourced into these libraries:

  • cert4android custom certificate management
  • dav4jvm WebDAV/CalDav/CardDAV framework
  • synctools iCalendar/vCard/Tasks processing and content provider access

If you want to support DAVx⁵, please consider donating to DAVx⁵ or purchasing it.

USED THIRD-PARTY LIBRARIES

The most important libraries which are used by DAVx⁵ (alphabetically):

See About / Libraries in the app for all used libraries and their licenses.

Description
No description provided
Readme GPL-3.0 63 MiB
Languages
Kotlin 98%
HTML 1.9%