Fix ktlint issues

This commit is contained in:
Benoit Marty 2024-01-10 19:33:39 +01:00
parent 140a11cf77
commit a831f05f6e
100 changed files with 66 additions and 158 deletions

View file

@ -31,7 +31,6 @@ import javax.inject.Inject
class AndroidClipboardHelper @Inject constructor(
@ApplicationContext private val context: Context,
) : ClipboardHelper {
private val clipboardManager = requireNotNull(context.getSystemService<ClipboardManager>())
override fun copyPlainText(text: String) {

View file

@ -17,7 +17,6 @@
package io.element.android.libraries.androidutils.clipboard
class FakeClipboardHelper : ClipboardHelper {
var clipboardContents: Any? = null
override fun copyPlainText(text: String) {

View file

@ -26,7 +26,6 @@ internal class DefaultDiffCallback<T>(
private val newList: List<T>,
private val areItemsTheSame: (oldItem: T?, newItem: T?) -> Boolean,
) : DiffUtil.Callback() {
override fun getOldListSize(): Int {
return oldList.size
}

View file

@ -40,7 +40,6 @@ interface MutableDiffCache<E> : DiffCache<E> {
*
*/
class MutableListDiffCache<E>(private val mutableList: MutableList<E?> = ArrayList()) : MutableDiffCache<E> {
override fun removeAt(index: Int): E? {
return mutableList.removeAt(index)
}

View file

@ -36,7 +36,6 @@ interface DiffCacheInvalidator<T> {
* It invalidates the cache by setting values to null.
*/
class DefaultDiffCacheInvalidator<T> : DiffCacheInvalidator<T> {
override fun onChanged(position: Int, count: Int, cache: MutableDiffCache<T>) {
for (i in position until position + count) {
// Invalidate cache

View file

@ -36,7 +36,6 @@ class DiffCacheUpdater<ListItem, CachedItem>(
private val cacheInvalidator: DiffCacheInvalidator<CachedItem> = DefaultDiffCacheInvalidator(),
private val areItemsTheSame: (oldItem: ListItem?, newItem: ListItem?) -> Boolean,
) {
private val lock = Object()
private var prevOriginalList: List<ListItem> = emptyList()