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:
parent
624372f527
commit
edb1579fe0
@ -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) {
|
||||
fsCache.collectionUnset(colMgr, colUid)
|
||||
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> {
|
||||
|
Loading…
Reference in New Issue
Block a user