|
|
@ -79,13 +79,7 @@ class SearchAdapter(context: Context, val callBack: CallBack) : |
|
|
|
tvAuthor.text = context.getString(R.string.author_show, searchBook.author) |
|
|
|
tvAuthor.text = context.getString(R.string.author_show, searchBook.author) |
|
|
|
bvOriginCount.setBadgeCount(searchBook.origins.size) |
|
|
|
bvOriginCount.setBadgeCount(searchBook.origins.size) |
|
|
|
upLasted(binding, searchBook.latestChapterTitle) |
|
|
|
upLasted(binding, searchBook.latestChapterTitle) |
|
|
|
if (searchBook.intro.isNullOrEmpty()) { |
|
|
|
tvIntroduce.text = searchBook.trimIntro(context) |
|
|
|
tvIntroduce.text = |
|
|
|
|
|
|
|
context.getString(R.string.intro_show_null) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
tvIntroduce.text = |
|
|
|
|
|
|
|
context.getString(R.string.intro_show, searchBook.intro) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
upKind(binding, searchBook.getKindList()) |
|
|
|
upKind(binding, searchBook.getKindList()) |
|
|
|
ivCover.load(searchBook.coverUrl, searchBook.name, searchBook.author) |
|
|
|
ivCover.load(searchBook.coverUrl, searchBook.name, searchBook.author) |
|
|
|
|
|
|
|
|
|
|
@ -98,15 +92,7 @@ class SearchAdapter(context: Context, val callBack: CallBack) : |
|
|
|
when (it) { |
|
|
|
when (it) { |
|
|
|
"origins" -> bvOriginCount.setBadgeCount(searchBook.origins.size) |
|
|
|
"origins" -> bvOriginCount.setBadgeCount(searchBook.origins.size) |
|
|
|
"last" -> upLasted(binding, searchBook.latestChapterTitle) |
|
|
|
"last" -> upLasted(binding, searchBook.latestChapterTitle) |
|
|
|
"intro" -> { |
|
|
|
"intro" -> tvIntroduce.text = searchBook.trimIntro(context) |
|
|
|
if (searchBook.intro.isNullOrEmpty()) { |
|
|
|
|
|
|
|
tvIntroduce.text = |
|
|
|
|
|
|
|
context.getString(R.string.intro_show_null) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
tvIntroduce.text = |
|
|
|
|
|
|
|
context.getString(R.string.intro_show, searchBook.intro) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
"kind" -> upKind(binding, searchBook.getKindList()) |
|
|
|
"kind" -> upKind(binding, searchBook.getKindList()) |
|
|
|
"cover" -> ivCover.load( |
|
|
|
"cover" -> ivCover.load( |
|
|
|
searchBook.coverUrl, |
|
|
|
searchBook.coverUrl, |
|
|
|