From 7d1dca07c1666de0d11bc3590aba694396a555cd Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Wed, 7 Jul 2021 17:28:05 -0400 Subject: [PATCH] close #1528 --- .../java/awais/instagrabber/adapters/DirectItemsAdapter.java | 2 +- .../java/awais/instagrabber/models/enums/DirectItemType.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/adapters/DirectItemsAdapter.java b/app/src/main/java/awais/instagrabber/adapters/DirectItemsAdapter.java index 165eddc2..dd744917 100644 --- a/app/src/main/java/awais/instagrabber/adapters/DirectItemsAdapter.java +++ b/app/src/main/java/awais/instagrabber/adapters/DirectItemsAdapter.java @@ -139,7 +139,7 @@ public final class DirectItemsAdapter extends RecyclerView.Adapter = mutableMapOf() @JvmStatic - fun getId(id: Int): DirectItemType? { - return map[id] + fun getTypeFromId(id: Int): DirectItemType { + return map[id] ?: UNKNOWN } fun getName(directItemType: DirectItemType): String? {