mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-20 04:39:04 +00:00
Fixes #2074
This commit is contained in:
parent
738f6e66f1
commit
13757f5251
1 changed files with 16 additions and 0 deletions
|
|
@ -62,11 +62,23 @@ class ArmoireActivity : BaseActivity() {
|
|||
|
||||
override fun getLayoutResId(): Int = R.layout.activity_armoire
|
||||
|
||||
private var hasUsedExtraArmoire = false
|
||||
|
||||
override fun getContentView(layoutResId: Int?): View {
|
||||
binding = ActivityArmoireBinding.inflate(layoutInflater)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun onSaveInstanceState(outState: Bundle) {
|
||||
outState.putBoolean("hasUsedExtraArmoire", hasUsedExtraArmoire)
|
||||
super.onSaveInstanceState(outState)
|
||||
}
|
||||
|
||||
override fun onRestoreInstanceState(savedInstanceState: Bundle) {
|
||||
super.onRestoreInstanceState(savedInstanceState)
|
||||
hasUsedExtraArmoire = savedInstanceState.getBoolean("hasUsedExtraArmoire")
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
|
|
@ -185,6 +197,10 @@ class ArmoireActivity : BaseActivity() {
|
|||
}
|
||||
|
||||
private fun giveUserArmoire(): Boolean {
|
||||
if (hasUsedExtraAmoire) {
|
||||
return false
|
||||
}
|
||||
hasUsedExtraAmoire = true
|
||||
binding.iconWrapper.post {
|
||||
binding.iconView.bitmap = null
|
||||
Animations.circularHide(binding.iconWrapper)
|
||||
|
|
|
|||
Loading…
Reference in a new issue