Commit 4fabe375 by 万齐军

feat: bug fix

parent 0faf5ec0
......@@ -58,6 +58,8 @@ import kotlinx.android.synthetic.main.confide_title_bar.*
@Route(path = ConfideRoute.R_CONFIDE_HOME)
class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHomeContract.Presenter>(),IConfideHomeContract.View,XRecyclerView.LoadingListener {
private var listenFree = false
override fun getContentViewId(): Int {
return R.id.rv_list
}
......@@ -208,11 +210,17 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
override fun onResume() {
super.onResume()
handleFree()
}
private fun handleFree() {
//登录了回来之后就不显示了
val isLogin = (findRouteService(IUserService::class.java).isLogin())
findViewById<View>(R.id.confide_Free).visibility = if (isLogin) View.GONE else View.VISIBLE
if (isLogin) {
findViewById<View>(R.id.confideRed).visibility = if (listenFree) View.VISIBLE else View.GONE
}
}
/**
* 初始化状态栏位置
......@@ -463,6 +471,10 @@ class ConfideHomeActivity : BaseLceActivity<IConfideHomeContract.View,IConfideHo
// rv_list.loadMoreComplete()
// }
mConfideAdapter!!.notifyDataSetChanged()
if (!bean.body.isNullOrEmpty()) {
listenFree = true//bean.body[0].listenFree ?: false
handleFree()
}
}
/**
......
......@@ -160,11 +160,9 @@ internal class IntroAdapter(
@OnLifecycleEvent(Lifecycle.Event.ON_PAUSE)
private fun onPause() {
if (data[curPos].isVideo) {
val ijkVideoView = videoViews[curPos]
ijkVideoView?.pause()
}
}
fun onSelect(position: Int) {
curPos = position
......
......@@ -89,6 +89,15 @@
android:textSize="13sp"
android:drawableRight="@drawable/confide_right_arrow" />
<ImageView
android:id="@+id/confideRed"
android:layout_width="@dimen/platform_dp_40"
android:layout_height="@dimen/confide_dp_25"
android:layout_gravity="right|top"
android:visibility="gone"
android:layout_marginEnd="10dp"
android:src="@drawable/confide__free" />
<TextView
android:id="@+id/confide_Free"
android:layout_width="wrap_content"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment