Skip to content

Commit

Permalink
Minor KDoc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 committed Nov 7, 2024
1 parent c202d92 commit 38a8d98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ open class LocalAddressBook @AssistedInject constructor(
}

/**
* Determines whether the address book should be set to read only.
* Determines whether the address book should be set to read-only.
*
* @param forceReadOnly Whether managed setting should overwrite read-only
* @param info Determine read-only flag from collection data
* @param forceReadOnly Whether (usually managed, app-wide) setting should overwrite local read-only information
* @param info Collection data to determine read-only status from (either user-set read-only flag or missing write privilege)
*/
@VisibleForTesting
internal fun shouldBeReadOnly(info: Collection, forceReadOnly: Boolean): Boolean =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import androidx.work.WorkManager
import at.bitfire.davdroid.R
import at.bitfire.davdroid.db.AppDatabase
import at.bitfire.davdroid.db.Service
import at.bitfire.davdroid.repository.AccountRepository
import at.bitfire.davdroid.repository.DavCollectionRepository
import at.bitfire.davdroid.repository.DavServiceRepository
import at.bitfire.davdroid.resource.LocalAddressBook
Expand Down Expand Up @@ -52,7 +51,6 @@ class AccountSettingsMigrations @AssistedInject constructor(
@Assisted val account: Account,
@Assisted val accountSettings: AccountSettings,
@ApplicationContext val context: Context,
private val accountRepository: AccountRepository,
private val collectionRepository: DavCollectionRepository,
private val db: AppDatabase,
private val localAddressBookFactory: LocalAddressBook.Factory,
Expand Down Expand Up @@ -103,7 +101,7 @@ class AccountSettingsMigrations @AssistedInject constructor(
collectionRepository.getByServiceAndUrl(service.id, url)?.let { collection ->
// Set collection ID and rename the account
val localAddressBook = localAddressBookFactory.create(oldAddressBookAccount, provider)
localAddressBook.update(collection, false)
localAddressBook.update(collection, /* read-only flag will be updated at next sync */ forceReadOnly = false)
}
}
}
Expand Down

0 comments on commit 38a8d98

Please sign in to comment.