mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-16 11:11:41 +00:00
Gem count check fix
This commit is contained in:
parent
9d1474168a
commit
b4c710f87b
1 changed files with 2 additions and 2 deletions
|
|
@ -226,11 +226,11 @@ open class ShopFragment : BaseMainFragment<FragmentRefreshRecyclerviewBinding>()
|
|||
lifecycleScope.launch(ExceptionHandler.coroutine()) {
|
||||
val user = userViewModel.user.value ?: return@launch
|
||||
context?.let { context ->
|
||||
if ((user.gemCount ?: 0) >= 3) {
|
||||
if ((user.gemCount ?: 0) <= 2) {
|
||||
val dialog = mainActivity?.let { InsufficientGemsDialog(it, 3) }
|
||||
dialog?.show()
|
||||
return@launch
|
||||
}
|
||||
} else
|
||||
if (user.flags?.classSelected == true && user.preferences?.disableClasses == false) {
|
||||
val alert = HabiticaAlertDialog(context)
|
||||
alert.setTitle(getString(R.string.change_class_selected_confirmation, classIdentifier))
|
||||
|
|
|
|||
Loading…
Reference in a new issue