正式发布环境隐藏个人等级入口

This commit is contained in:
lyr
2021-03-10 18:53:59 +08:00
parent 11f84b69ac
commit 52cffde739
2 changed files with 9 additions and 4 deletions

View File

@ -5,10 +5,12 @@ import android.graphics.Canvas
import android.graphics.drawable.BitmapDrawable
import android.os.Build
import android.os.Bundle
import android.view.Gravity
import android.view.LayoutInflater
import android.view.View
import android.widget.*
import android.widget.CheckedTextView
import android.widget.LinearLayout
import android.widget.PopupWindow
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.Observer
@ -37,7 +39,6 @@ import com.gh.gamecenter.personalhome.home.UserCommentHistoryFragment
import com.gh.gamecenter.personalhome.home.UserHistoryFragment
import com.gh.gamecenter.personalhome.home.UserHistoryViewModel
import com.gh.gamecenter.personalhome.home.UserVideoHistoryFragment
import com.gh.gamecenter.security.BindPhoneActivity
import com.gh.gamecenter.user.UserViewModel
import com.google.android.material.appbar.AppBarLayout
import com.google.android.material.appbar.AppBarLayout.OnOffsetChangedListener
@ -88,7 +89,9 @@ class UserHomeFragment : NormalFragment() {
getBadgeList()
getUserPlayedGame()
getUserPlayedGameCount()
getUserLevel()
if (BuildConfig.DEBUG || BuildConfig.BUILD_TIME != 0L) {
getUserLevel()
}
}
mHomeBinding?.container?.setZoomView(mHomeBinding?.userBackgroundContainer)
@ -154,6 +157,7 @@ class UserHomeFragment : NormalFragment() {
}
}
}
mUserHomeViewModel.availableBadgeCount.observeNonNull(this) {
mHomeBinding?.viewBadgeMessageTip?.visibleIf(it > 0)
if (mUserHomeViewModel.badges.value?.isEmpty() == true && it > 0) {