Skip to content

Commit

Permalink
Improve insufficient gem display
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed May 31, 2024
1 parent 8ab3f22 commit 8388a8c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 13 deletions.
6 changes: 4 additions & 2 deletions Habitica/res/layout/dialog_habitica_primary_button.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="wrap_content"
style="@style/HabiticaButton.Primary"
tools:text="Test">
android:paddingTop="@dimen/spacing_medium"
android:paddingBottom="@dimen/spacing_medium"
tools:text="Tesqweqwe qweqwe qweq eqweq weqwe qweqweqw eqwe qwe qweqweq qwe qweq weq w qweq weqw eqwe qwe qwe qwet">
</Button>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Button xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_height="wrap_content"
style="@style/HabiticaButton.Maroon">
</Button>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.habitrpg.common.habitica.helpers.ExceptionHandler
import com.habitrpg.common.habitica.helpers.MainNavigationController
import com.habitrpg.common.habitica.helpers.launchCatching
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
import javax.inject.Inject

Expand Down Expand Up @@ -116,7 +117,9 @@ class EquipmentDetailFragment :

type?.let { type ->
lifecycleScope.launchCatching {
inventoryRepository.getOwnedEquipment(type).collect { adapter.data = it }
inventoryRepository.getOwnedEquipment(type)
.map { it.sortedBy { equipment -> equipment.text } }
.collect { adapter.data = it }
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class GemsPurchaseFragment : BaseFragment<FragmentGemPurchaseBinding>() {
}
binding?.promoComposeView?.isVisible = true
}
loadInventory()

Analytics.sendNavigationEvent("gem screen")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import androidx.appcompat.app.AlertDialog
import androidx.appcompat.app.AppCompatActivity
import androidx.core.content.ContextCompat
import androidx.core.view.children
import androidx.core.view.isVisible
import androidx.lifecycle.lifecycleScope
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.databinding.DialogHabiticaBaseBinding
Expand Down Expand Up @@ -82,6 +83,12 @@ open class HabiticaAlertDialog(context: Context) : AlertDialog(context, R.style.
}
}

var titleTextViewVisibility: Boolean
get() = binding.titleTextView.isVisible
set(value) {
binding.titleTextView.isVisible = value
}

init {
setView(binding.root)
binding.closeButton.setOnClickListener { dismiss() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ abstract class InsufficientCurrencyDialog(context: Context) : HabiticaAlertDialo
val inflater = LayoutInflater.from(context)
val view = inflater.inflate(getLayoutID(), null)
setAdditionalContentView(view)
titleTextViewVisibility = false

imageView = view.findViewById(R.id.imageView)
textView = view.findViewById(R.id.textView)
Expand Down
8 changes: 0 additions & 8 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,6 @@ Submit a new Beta Build to Google Play

Deploy a new version to the Google Play

### android upload_to_slack

```sh
[bundle exec] fastlane android upload_to_slack
```

Upload the latest output APK to slack

----

This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
Expand Down
2 changes: 1 addition & 1 deletion version.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NAME=4.3.7
CODE=7801
CODE=7821

0 comments on commit 8388a8c

Please sign in to comment.