Fix ktlint issues
This commit is contained in:
parent
140a11cf77
commit
a831f05f6e
100 changed files with 66 additions and 158 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
package io.element.android.libraries.androidutils.clipboard
|
||||
|
||||
class FakeClipboardHelper : ClipboardHelper {
|
||||
|
||||
var clipboardContents: Any? = null
|
||||
|
||||
override fun copyPlainText(text: String) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue