Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bitfireAT/ical4android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/bitfire/ical4android/JtxCollection.kt')
-rw-r--r--src/main/java/at/bitfire/ical4android/JtxCollection.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/at/bitfire/ical4android/JtxCollection.kt b/src/main/java/at/bitfire/ical4android/JtxCollection.kt
index 5eb5b1c..1527ef5 100644
--- a/src/main/java/at/bitfire/ical4android/JtxCollection.kt
+++ b/src/main/java/at/bitfire/ical4android/JtxCollection.kt
@@ -132,11 +132,12 @@ open class JtxCollection<out T: JtxICalObject>(val account: Account,
}
/**
- * @param [UID] of the entry that should be retrieved as content values
+ * @param [uid] of the entry that should be retrieved as content values
* @return Content Values of the found item with the given UID or null if the result was empty or more than 1
+ * The query checks for the [uid] within all collections of this account, not only the current collection.
*/
fun queryByUID(uid: String): ContentValues? {
- client.query(JtxContract.JtxICalObject.CONTENT_URI.asSyncAdapter(account), null, "${JtxContract.JtxICalObject.ICALOBJECT_COLLECTIONID} = ? AND ${JtxContract.JtxICalObject.UID} = ?", arrayOf(id.toString(), uid), null).use { cursor ->
+ client.query(JtxContract.JtxICalObject.CONTENT_URI.asSyncAdapter(account), null, "${JtxContract.JtxICalObject.UID} = ?", arrayOf(uid), null).use { cursor ->
Ical4Android.log.fine("queryByUID: found ${cursor?.count} records in ${account.name}")
if (cursor?.count != 1)
return null