Merge branch 'feedback-updates'

This commit is contained in:
Hafiz 2025-06-10 16:59:00 -05:00
commit 98b684fb27
4 changed files with 27 additions and 66 deletions

View file

@ -37,42 +37,6 @@
android:visibility="invisible"/> android:visibility="invisible"/>
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center">
<TextView
style="@style/Caption3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/groups"
android:textAllCaps="true" />
<Button
android:id="@+id/challenge_filter_button_all"
style="@style/Body1_Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end|center_vertical"
android:text="@string/all"
android:textColor="#6133b4"
android:textSize="16sp"
android:padding="0dp" />
<Button
android:id="@+id/challenge_filter_button_none"
style="@style/Body1_Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="end|center_vertical"
android:text="@string/none"
android:textColor="#6133b4"
android:textSize="16sp"
android:padding="0dp"/>
</LinearLayout>
<com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport <com.habitrpg.android.habitica.ui.helpers.RecyclerViewEmptySupport
android:id="@+id/challenge_filter_recycler_view" android:id="@+id/challenge_filter_recycler_view"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -1039,6 +1039,7 @@
<string name="mana_description">Mana points are unlocked with the class system at level 10 and allow you to **use Skills** once you begin learning them at level 11.\n\nSome **MP is restored** at day reset every day, but you can regain more by completing tasks or using a Mage class skill.</string> <string name="mana_description">Mana points are unlocked with the class system at level 10 and allow you to **use Skills** once you begin learning them at level 11.\n\nSome **MP is restored** at day reset every day, but you can regain more by completing tasks or using a Mage class skill.</string>
<string name="stat_allocation">Stat Allocation</string> <string name="stat_allocation">Stat Allocation</string>
<string name="stat_description">All Habitica characters have four stats that affect the gameplay aspects of Habitica.\n\n**Strength (STR)** affects critical hits and raises damage done to a Quest Boss. Warriors and Rogues gain STR from their class equipment.\n\n**Constitution (CON)** raises your HP and makes you take less damage. Healers and Warriors gain CON from their class equipment.\n\n**Intelligence (INT)** raises the amount of EXP you earn and gives you more Mana. Mages and Healers gain INT from their class equipment.\n\n**Perception (PER)** increases the gold you earn and the rate of finding dropped items. Rogues and Mages gain PER from their class equipment.\n\nAfter level 10, you earn 1 Stat Point every level you gain that you can put into any stat youd like. You can also equip gear that has different combinations of stat boosts.</string> <string name="stat_description">All Habitica characters have four stats that affect the gameplay aspects of Habitica.\n\n**Strength (STR)** affects critical hits and raises damage done to a Quest Boss. Warriors and Rogues gain STR from their class equipment.\n\n**Constitution (CON)** raises your HP and makes you take less damage. Healers and Warriors gain CON from their class equipment.\n\n**Intelligence (INT)** raises the amount of EXP you earn and gives you more Mana. Mages and Healers gain INT from their class equipment.\n\n**Perception (PER)** increases the gold you earn and the rate of finding dropped items. Rogues and Mages gain PER from their class equipment.\n\nAfter level 10, you earn 1 Stat Point every level you gain that you can put into any stat youd like. You can also equip gear that has different combinations of stat boosts.</string>
<string name="use_skill">Use Skill</string>
<string name="standard"> Standard </string> <string name="standard"> Standard </string>
<string name="premium_currency">Premium Currency</string> <string name="premium_currency">Premium Currency</string>

View file

@ -22,8 +22,6 @@ internal class ChallengeFilterDialogHolder private constructor(
private var adapter: ChallengesFilterRecyclerViewAdapter? = null private var adapter: ChallengesFilterRecyclerViewAdapter? = null
init { init {
binding.challengeFilterButtonAll.setOnClickListener { allClicked() }
binding.challengeFilterButtonNone.setOnClickListener { noneClicked() }
binding.challengeFilterOwned.setOnCheckedChangeListener { _, isChecked -> binding.challengeFilterOwned.setOnCheckedChangeListener { _, isChecked ->
currentFilter?.showOwned = isChecked currentFilter?.showOwned = isChecked
} }
@ -59,15 +57,6 @@ internal class ChallengeFilterDialogHolder private constructor(
binding.challengeFilterRecyclerView.state = RecyclerViewState.DISPLAYING_DATA binding.challengeFilterRecyclerView.state = RecyclerViewState.DISPLAYING_DATA
} }
private fun allClicked() {
this.adapter?.checkedEntries?.clear()
adapter?.checkedEntries?.addAll(filterGroups)
}
private fun noneClicked() {
this.adapter?.checkedEntries?.clear()
}
companion object { companion object {
fun showDialog( fun showDialog(
activity: Activity, activity: Activity,

View file

@ -25,10 +25,12 @@ import androidx.compose.material3.Icon
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.painterResource
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.* import androidx.compose.foundation.layout.*
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.graphics.painter.Painter
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import com.habitrpg.android.habitica.ui.theme.pixelArtBackground import com.habitrpg.android.habitica.ui.theme.pixelArtBackground
@ -44,6 +46,10 @@ fun SkillDialog(
onUseSkill: () -> Unit, onUseSkill: () -> Unit,
) { ) {
val colors = HabiticaTheme.colors val colors = HabiticaTheme.colors
val isDark = isSystemInDarkTheme()
val chipBg = colorResource(R.color.blue_500_24)
val chipTextColor = if (isDark) colorResource(R.color.blue_500) else colorResource(R.color.blue_10)
Box( Box(
modifier modifier
.fillMaxWidth() .fillMaxWidth()
@ -55,23 +61,23 @@ fun SkillDialog(
modifier = Modifier.fillMaxWidth() modifier = Modifier.fillMaxWidth()
) { ) {
Box( Box(
Modifier modifier =
.padding(bottom = 12.dp) Modifier
.size(width = 38.dp, height = 6.dp) .padding(bottom = 16.dp)
.clip(CircleShape) .background(colorResource(R.color.content_background_offset))
.background(colors.textSecondary) .size(24.dp, 3.dp)
) )
Box( Box(
Modifier Modifier
.size(54.dp) .size(70.dp)
.clip(RoundedCornerShape(12.dp)) .clip(RoundedCornerShape(12.dp))
.background(colors.pixelArtBackground(hasIcon = true)), .background(colors.pixelArtBackground(hasIcon = true)),
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
PixelArtView ( PixelArtView (
imageName = skillPath + skillKey, imageName = skillPath + skillKey,
modifier = Modifier.size(48.dp) modifier = Modifier.size(62.dp)
) )
} }
@ -79,15 +85,15 @@ fun SkillDialog(
Text( Text(
text = title, text = title,
fontSize = 22.sp, fontSize = 16.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Normal,
color = colors.textPrimary, color = colors.textPrimary,
modifier = Modifier.padding(top = 2.dp) modifier = Modifier.padding(top = 2.dp)
) )
Text( Text(
text = description, text = description,
fontSize = 15.sp, fontSize = 14.sp,
color = colors.textSecondary, color = colors.textSecondary,
modifier = Modifier.padding(top = 8.dp), modifier = Modifier.padding(top = 8.dp),
textAlign = TextAlign.Center textAlign = TextAlign.Center
@ -99,20 +105,20 @@ fun SkillDialog(
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
modifier = Modifier modifier = Modifier
.clip(RoundedCornerShape(20.dp)) .clip(RoundedCornerShape(20.dp))
.background(Color(0xFF393F68)) .background(chipBg)
.padding(horizontal = 20.dp, vertical = 8.dp) .padding(horizontal = 20.dp, vertical = 8.dp)
) { ) {
Icon( Icon(
painter = resourceIconPainter, painter = resourceIconPainter,
contentDescription = null, contentDescription = null,
tint = Color(0xFF77C7F7), tint = Color.Unspecified,
modifier = Modifier.size(22.dp) modifier = Modifier.size(22.dp)
) )
Spacer(Modifier.width(8.dp)) Spacer(Modifier.width(8.dp))
Text( Text(
text = mpCost, text = mpCost,
color = Color.White, color = chipTextColor,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Normal,
fontSize = 16.sp fontSize = 16.sp
) )
} }
@ -121,21 +127,22 @@ fun SkillDialog(
Button( Button(
onClick = onUseSkill, onClick = onUseSkill,
shape = RoundedCornerShape(8.dp),
colors = ButtonDefaults.buttonColors( colors = ButtonDefaults.buttonColors(
containerColor = Color(0xFFA380FC), containerColor = colorResource(R.color.brand_400),
contentColor = Color.White contentColor = Color.White
), ),
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.height(48.dp) .height(48.dp)
.clip(RoundedCornerShape(12.dp))
) { ) {
Text( Text(
text = "Use Skill", text = stringResource(R.string.use_skill),
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Normal,
fontSize = 17.sp fontSize = 17.sp
) )
} }
} }
} }
} }