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> {
|
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 {
|
return toMutableList().apply {
|
||||||
repeat(fakeItemCount) {
|
repeat(fakeItemCount) {
|
||||||
add(ForumRecommend.LikeForum("", "", "1", "0", "", isFake = true))
|
add(ForumRecommend.LikeForum("", "", "1", "0", "", isFake = true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
override fun onRefresh() {
|
override fun onRefresh() {
|
||||||
if (isFragmentVisible) {
|
if (isFragmentVisible) {
|
||||||
|
|
|
||||||
|
|
@ -371,7 +371,7 @@ object ThemeUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
fun setTranslucentThemeBackground(view: View) {
|
fun setTranslucentThemeBackground(view: View?) {
|
||||||
setTranslucentThemeBackground(view, true, false)
|
setTranslucentThemeBackground(view, true, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue