1
0
mirror of https://github.com/etesync/android synced 2024-12-23 07:08:16 +00:00

LocalCache: allow trying to unset non-existent collection.

This commit is contained in:
Tom Hacohen 2020-10-14 20:54:00 +03:00
parent 624372f527
commit edb1579fe0

View File

@ -4,6 +4,7 @@ import android.content.Context
import com.etebase.client.*
import com.etebase.client.Collection
import com.etebase.client.exceptions.EtebaseException
import com.etebase.client.exceptions.UrlParseException
import okhttp3.OkHttpClient
import java.io.File
import java.util.*
@ -58,7 +59,11 @@ class EtebaseLocalCache private constructor(context: Context, username: String)
}
fun collectionUnset(colMgr: CollectionManager, colUid: String) {
try {
fsCache.collectionUnset(colMgr, colUid)
} catch (e: UrlParseException) {
// Ignore, as it just means the file doesn't exist
}
}
fun itemList(itemMgr: ItemManager, colUid: String, withDeleted: Boolean = false): List<CachedItem> {