Don't offer to delete a list that is the account's calendar home (#180)
This commit is contained in:
1 parent
74d6be61f2
commit
1c59c5e409
13 files changed
+65
-11
No files matched your search
@@ -205,6 +205,7 @@ class RemoteListRepository @Inject constructor(
|
||||
val url = list.href?.toHttpUrlOrNull() ?: return@withContext Outcome.NoAccount
|
||||
val account = list.accountId?.let { database.accounts().account(it) }
|
||||
?: return@withContext Outcome.NoAccount
|
||||
if (isHomeSet(list.href, account.homeSetUrl)) return@withContext Outcome.AccountHome
|
||||
val admin = adminFor(account) ?: return@withContext Outcome.NoAccount
|
||||
|
||||
when (val outcome = admin.delete(url)) {
|
||||
|
||||
Reference in new issue
Block a user