fix issue with blocking

This commit is contained in:
Phillip Thelen 2023-05-11 15:03:05 +02:00
parent 6891fb23ac
commit 4b9ba6c3f9
8 changed files with 21 additions and 12 deletions

View file

@ -26,7 +26,7 @@
android:layout_height="wrap_content"
app:subtitle="HP"
app:title="@string/health_points"
app:titleColor="@color/text_red_white"
app:titleColor="@color/text_red"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -38,7 +38,7 @@
android:layout_height="wrap_content"
app:subtitle="EXP"
app:title="@string/experience_points"
app:titleColor="@color/text_yellow_white"
app:titleColor="@color/text_yellow"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -49,7 +49,7 @@
android:layout_height="wrap_content"
app:subtitle="MP"
app:title="@string/mana_points"
app:titleColor="@color/text_blue_white"
app:titleColor="@color/text_blue"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -60,7 +60,7 @@
android:layout_height="wrap_content"
app:subtitle="@string/currency"
app:title="@string/gold_capitalized"
app:titleColor="@color/text_orange_white"
app:titleColor="@color/text_orange"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -71,7 +71,7 @@
android:layout_height="wrap_content"
app:subtitle="@string/premium_currency"
app:title="@string/gems"
app:titleColor="@color/text_green_white"
app:titleColor="@color/text_green"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -82,7 +82,7 @@
android:layout_height="wrap_content"
app:subtitle="@string/subscriber_currency"
app:title="@string/mystic_hourglasses"
app:titleColor="@color/text_brand_white"
app:titleColor="@color/text_brand"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
@ -93,7 +93,7 @@
android:layout_height="wrap_content"
app:subtitle="STR, CON, INT, PER"
app:title="@string/stat_allocation"
app:titleColor="@color/text_brown_white"
app:titleColor="@color/text_brown"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"

View file

@ -223,7 +223,7 @@
<string name="by_email">By Email</string>
<string name="invite_existing_users">Invite Existing Users</string>
<string name="send">Send</string>
<string name="invite">Invite Friends</string>
<string name="invite">Find Members</string>
<string name="invite_email_description">If a friend joins Habitica via your email, they\'ll automatically be invited to your party!</string>
<string name="add_invites">Add Invites</string>
<string name="email">Email</string>

View file

@ -27,6 +27,7 @@
<color name="background_teal">@color/teal_50</color>
<color name="background_brand">@color/brand_200</color>
<color name="background_brand_30">#4D4f2a93</color>
<color name="text_brown">#F26100</color>
<color name="checkbox_fill">#40000000</color>
<color name="checkbox_fill_inactive">#80000000</color>

View file

@ -98,6 +98,7 @@
<color name="background_teal">@color/teal_100</color>
<color name="background_brand">@color/brand_300</color>
<color name="background_brand_30">#4D6033B5</color>
<color name="text_brown">#7f3300</color>
<color name="checkbox_fill">#50ffffff</color>
<color name="checkbox_fill_inactive">#99FFFFFF</color>

View file

@ -304,7 +304,7 @@
<string name="by_email">By Email</string>
<string name="invite_existing_users">Invite Existing Users</string>
<string name="send">Send</string>
<string name="invite">Invite Friends</string>
<string name="invite">Find Members</string>
<string name="invite_username_description">If you have friends already using Habitica, invite them by username here.</string>
<string name="invite_email_description">If a friend joins Habitica via your email, they\'ll automatically be invited to your party!</string>
<string name="add_invites">Add Invites</string>
@ -326,7 +326,7 @@
<string name="login_incentive">Unlock by logging into Habitica regularly</string>
<string name="login_incentive_count">Unlock by checking into Habitica %d times.</string>
<string name="create_account">Unlock by creating an account</string>
<string name="party_invite_short">Invite Friends</string>
<string name="party_invite_short">Find Members</string>
<string name="login_incentive_short">log into Habitica regularly</string>
<string name="login_incentive_short_count">%d Checkins</string>
<string name="create_account_short">create an account</string>

View file

@ -323,7 +323,7 @@ class FullProfileActivity : BaseActivity() {
private fun useBlock() {
lifecycleScope.launchCatching {
socialRepository.blockMember(userID)
userRepository.retrieveUser()
userRepository.retrieveUser(false, true)
invalidateOptionsMenu()
}
}

View file

@ -1,6 +1,7 @@
package com.habitrpg.android.habitica.ui.views.social
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
@ -22,7 +23,9 @@ import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.habitrpg.android.habitica.MainNavDirections
import com.habitrpg.android.habitica.R
import com.habitrpg.android.habitica.helpers.MainNavigationController
import com.habitrpg.android.habitica.models.auth.LocalAuthentication
import com.habitrpg.android.habitica.models.members.Member
import com.habitrpg.android.habitica.models.members.MemberFlags
@ -53,6 +56,10 @@ fun PartySeekingListItem(
Column(
modifier
.fillMaxWidth()
.clickable {
val profileDirections = MainNavDirections.openProfileActivity(user.id)
MainNavigationController.navigate(profileDirections)
}
.padding(bottom = 6.dp)
.background(HabiticaTheme.colors.windowBackground, HabiticaTheme.shapes.large)
.padding(14.dp)

View file

@ -1,2 +1,2 @@
NAME=4.2
CODE=6031
CODE=6041