change: Remove dead code
This commit is contained in:
parent
6fd993acf6
commit
c8532c9fb4
@ -42,7 +42,6 @@ import org.xml.sax.XMLReader
|
||||
|
||||
class ViewEditsAdapter(
|
||||
private val edits: List<StatusEdit>,
|
||||
private val animateAvatars: Boolean,
|
||||
private val animateEmojis: Boolean,
|
||||
private val useBlurhash: Boolean,
|
||||
private val listener: LinkListener,
|
||||
@ -210,11 +209,6 @@ class ViewEditsAdapter(
|
||||
}
|
||||
|
||||
override fun getItemCount() = edits.size
|
||||
|
||||
companion object {
|
||||
private const val VIEW_TYPE_EDITS_NEWEST = 0
|
||||
private const val VIEW_TYPE_EDITS = 1
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,7 +131,6 @@ class ViewEditsFragment :
|
||||
|
||||
binding.recyclerView.adapter = ViewEditsAdapter(
|
||||
edits = uiState.edits,
|
||||
animateAvatars = animateAvatars,
|
||||
animateEmojis = animateEmojis,
|
||||
useBlurhash = useBlurhash,
|
||||
listener = this@ViewEditsFragment,
|
||||
|
@ -30,21 +30,3 @@ fun <T> removeDuplicates(list: List<T>): ArrayList<T> {
|
||||
val set = LinkedHashSet(list)
|
||||
return ArrayList(set)
|
||||
}
|
||||
|
||||
inline fun <T> List<T>.withoutFirstWhich(predicate: (T) -> Boolean): List<T> {
|
||||
val newList = toMutableList()
|
||||
val index = newList.indexOfFirst(predicate)
|
||||
if (index != -1) {
|
||||
newList.removeAt(index)
|
||||
}
|
||||
return newList
|
||||
}
|
||||
|
||||
inline fun <T> List<T>.replacedFirstWhich(replacement: T, predicate: (T) -> Boolean): List<T> {
|
||||
val newList = toMutableList()
|
||||
val index = newList.indexOfFirst(predicate)
|
||||
if (index != -1) {
|
||||
newList[index] = replacement
|
||||
}
|
||||
return newList
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user