Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf08231b authored by Ricki Hirner's avatar Ricki Hirner
Browse files

Don't sync Webcal-only calendars/tasks lists over CalDAV (may cause duplicate calendars)

(If a calendar is both CalDAV- and Webcal-capable, i.e. resourcetype is collection
and subscribed, it will be shown as CalDAV calendar.)
parent 1973fc4f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ android {
    defaultConfig {
        applicationId "at.bitfire.davdroid"

        versionCode 303060000
        versionCode 303060001
        buildConfigField "long", "buildTime", System.currentTimeMillis() + "L"

        minSdkVersion 21        // Android 5
+2 −2
Original line number Diff line number Diff line
@@ -28,10 +28,10 @@ interface CollectionDao: SyncableDao<Collection> {
    @Query("SELECT COUNT(*) FROM collection WHERE serviceId=:serviceId AND sync")
    fun observeHasSyncByService(serviceId: Long): LiveData<Boolean>

    @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND supportsVEVENT AND sync ORDER BY displayName, url")
    @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND type='${Collection.TYPE_CALENDAR}' AND supportsVEVENT AND sync ORDER BY displayName, url")
    fun getSyncCalendars(serviceId: Long): List<Collection>

    @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND supportsVTODO AND sync ORDER BY displayName, url")
    @Query("SELECT * FROM collection WHERE serviceId=:serviceId AND type='${Collection.TYPE_CALENDAR}' AND supportsVTODO AND sync ORDER BY displayName, url")
    fun getSyncTaskLists(serviceId: Long): List<Collection>

    @Insert(onConflict = OnConflictStrategy.REPLACE)