fix: 修复 Bugs
This commit is contained in:
parent
4b3e3346bb
commit
511f792b3a
|
|
@ -298,13 +298,17 @@ class MainForumListFragment : BaseFragment(), Refreshable, Toolbar.OnMenuItemCli
|
|||
}
|
||||
|
||||
private fun List<ForumRecommend.LikeForum>.addFakeItems(divisor: Int): List<ForumRecommend.LikeForum> {
|
||||
val fakeItemCount = divisor - (size % divisor)
|
||||
val mod = size % divisor
|
||||
if (mod > 0) {
|
||||
val fakeItemCount = divisor - mod
|
||||
return toMutableList().apply {
|
||||
repeat(fakeItemCount) {
|
||||
add(ForumRecommend.LikeForum("", "", "1", "0", "", isFake = true))
|
||||
}
|
||||
}
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
override fun onRefresh() {
|
||||
if (isFragmentVisible) {
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ object ThemeUtil {
|
|||
}
|
||||
|
||||
@JvmStatic
|
||||
fun setTranslucentThemeBackground(view: View) {
|
||||
fun setTranslucentThemeBackground(view: View?) {
|
||||
setTranslucentThemeBackground(view, true, false)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue