Browse Source
renovate/org.jetbrains.kotlinx-kotlinx-coroutines-test-1.x
Austin Huang
4 years ago
No known key found for this signature in database
GPG Key ID: 84C23AA04587A91F
2 changed files with
3 additions and
3 deletions
-
app/src/main/java/awais/instagrabber/adapters/DirectItemsAdapter.java
-
app/src/main/java/awais/instagrabber/models/enums/DirectItemType.kt
|
|
@ -139,7 +139,7 @@ public final class DirectItemsAdapter extends RecyclerView.Adapter<RecyclerView. |
|
|
|
return new HeaderViewHolder(LayoutDmHeaderBinding.inflate(layoutInflater, parent, false)); |
|
|
|
} |
|
|
|
final LayoutDmBaseBinding baseBinding = LayoutDmBaseBinding.inflate(layoutInflater, parent, false); |
|
|
|
final DirectItemType directItemType = DirectItemType.Companion.getId(type); |
|
|
|
final DirectItemType directItemType = DirectItemType.Companion.getTypeFromId(type); |
|
|
|
final DirectItemViewHolder itemViewHolder = getItemViewHolder(layoutInflater, baseBinding, directItemType); |
|
|
|
itemViewHolder.setLongClickListener(longClickListener); |
|
|
|
return itemViewHolder; |
|
|
|
|
|
@ -64,8 +64,8 @@ enum class DirectItemType(val id: Int) : Serializable { |
|
|
|
private val map: MutableMap<Int, DirectItemType> = mutableMapOf() |
|
|
|
|
|
|
|
@JvmStatic |
|
|
|
fun getId(id: Int): DirectItemType? { |
|
|
|
return map[id] |
|
|
|
fun getTypeFromId(id: Int): DirectItemType { |
|
|
|
return map[id] ?: UNKNOWN |
|
|
|
} |
|
|
|
|
|
|
|
fun getName(directItemType: DirectItemType): String? { |
|
|
|