change: Remove dead code

This commit is contained in:
Nik Clayton 2024-04-30 16:05:55 +02:00
parent 6fd993acf6
commit c8532c9fb4
3 changed files with 0 additions and 25 deletions

View File

@ -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
}
}
/**

View File

@ -131,7 +131,6 @@ class ViewEditsFragment :
binding.recyclerView.adapter = ViewEditsAdapter(
edits = uiState.edits,
animateAvatars = animateAvatars,
animateEmojis = animateEmojis,
useBlurhash = useBlurhash,
listener = this@ViewEditsFragment,

View File

@ -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
}