mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
l4p improvements
This commit is contained in:
parent
2c1102da55
commit
2423081a97
10 changed files with 18 additions and 9 deletions
BIN
Habitica/res/drawable-hdpi/looking_for_party_empty.png
Normal file
BIN
Habitica/res/drawable-hdpi/looking_for_party_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
Habitica/res/drawable-mdpi/looking_for_party_empty.png
Normal file
BIN
Habitica/res/drawable-mdpi/looking_for_party_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
BIN
Habitica/res/drawable-xhdpi/looking_for_party_empty.png
Normal file
BIN
Habitica/res/drawable-xhdpi/looking_for_party_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
BIN
Habitica/res/drawable-xxhdpi/looking_for_party_empty.png
Normal file
BIN
Habitica/res/drawable-xxhdpi/looking_for_party_empty.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
|
|
@ -3,7 +3,9 @@ package com.habitrpg.android.habitica.helpers
|
|||
import com.habitrpg.common.habitica.helpers.launchCatching
|
||||
import kotlinx.coroutines.MainScope
|
||||
import javax.inject.Inject
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Singleton
|
||||
class SoundManager @Inject constructor(var soundFileLoader: SoundFileLoader) {
|
||||
var soundTheme: String = SoundThemeOff
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ import com.habitrpg.android.habitica.ui.helpers.SafeDefaultItemAnimator
|
|||
import com.habitrpg.android.habitica.ui.viewmodels.MainUserViewModel
|
||||
import com.habitrpg.android.habitica.ui.views.CurrencyText
|
||||
import com.habitrpg.android.habitica.ui.views.dialogs.HabiticaAlertDialog
|
||||
import com.habitrpg.android.habitica.ui.views.getTranslatedClassName
|
||||
import com.habitrpg.android.habitica.ui.views.insufficientCurrency.InsufficientGemsDialog
|
||||
import com.habitrpg.android.habitica.ui.views.shops.PurchaseDialog
|
||||
import com.habitrpg.common.habitica.helpers.ExceptionHandler
|
||||
|
|
@ -246,7 +245,7 @@ open class ShopFragment : BaseMainFragment<FragmentRefreshRecyclerviewBinding>()
|
|||
dialog.enqueue()
|
||||
}
|
||||
} else {
|
||||
val dialog = context?.let { InsufficientGemsDialog(it, 3) }
|
||||
val dialog = activity?.let { InsufficientGemsDialog(it, 3) }
|
||||
dialog?.show()
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import android.view.LayoutInflater
|
|||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
|
|
@ -27,6 +28,7 @@ import androidx.compose.runtime.rememberCoroutineScope
|
|||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
|
|
@ -191,6 +193,10 @@ fun PartySeekingView(
|
|||
.width(250.dp)
|
||||
.align(alignment = Alignment.CenterHorizontally)
|
||||
)
|
||||
Image(
|
||||
painterResource(R.drawable.looking_for_party_empty), null,
|
||||
modifier = Modifier.padding(top = 50.dp)
|
||||
)
|
||||
} else {
|
||||
Text(
|
||||
stringResource(R.string.habiticans_looking_party),
|
||||
|
|
@ -210,7 +216,9 @@ fun PartySeekingView(
|
|||
user = it,
|
||||
inviteState =viewModel.inviteStates[it.id] ?: LoadingButtonState.CONTENT,
|
||||
isInvited = viewModel.successfulInvites.contains(it.id),
|
||||
modifier = Modifier.animateItemPlacement().padding(horizontal = 14.dp)
|
||||
modifier = Modifier
|
||||
.animateItemPlacement()
|
||||
.padding(horizontal = 14.dp)
|
||||
) { member ->
|
||||
scope.launchCatching({
|
||||
viewModel.inviteStates[member.id] = LoadingButtonState.FAILED
|
||||
|
|
|
|||
|
|
@ -105,8 +105,7 @@ class BugFixFragment : BaseMainFragment<FragmentSupportBugFixBinding>() {
|
|||
val newLine = "%0D%0A"
|
||||
var bodyOfEmail = Uri.encode("Device: $manufacturer $deviceName") +
|
||||
newLine + Uri.encode("Android Version: $version") +
|
||||
newLine + Uri.encode(
|
||||
"AppVersion: " + getString(
|
||||
newLine + Uri.encode("AppVersion: " + getString(
|
||||
R.string.version_info,
|
||||
versionName,
|
||||
versionCode
|
||||
|
|
@ -114,9 +113,9 @@ class BugFixFragment : BaseMainFragment<FragmentSupportBugFixBinding>() {
|
|||
)
|
||||
|
||||
if (appConfigManager.testingLevel().name != AppTestingLevel.PRODUCTION.name) {
|
||||
bodyOfEmail += newLine + Uri.encode(appConfigManager.testingLevel().name)
|
||||
bodyOfEmail += " " + Uri.encode(appConfigManager.testingLevel().name)
|
||||
}
|
||||
bodyOfEmail += newLine + Uri.encode("User ID: $userViewModel.userID")
|
||||
bodyOfEmail += newLine + Uri.encode("User ID: ${userViewModel.userID}")
|
||||
|
||||
userViewModel.user.value?.let { user ->
|
||||
bodyOfEmail += newLine + Uri.encode("Level: " + (user.stats?.lvl ?: 0)) +
|
||||
|
|
|
|||
|
|
@ -416,7 +416,8 @@ class PurchaseDialog(context: Context, private val userRepository : UserReposito
|
|||
"hourglasses" -> ContextCompat.getColor(context, R.color.text_brand)
|
||||
else -> 0
|
||||
}
|
||||
((application?.currentActivity?.get() ?: getActivity() ?: ownerActivity) as? SnackbarActivity)?.showSnackbar(
|
||||
val a = (application?.currentActivity?.get() ?: getActivity() ?: ownerActivity)
|
||||
(a as? SnackbarActivity)?.showSnackbar(
|
||||
content = text,
|
||||
rightIcon = priceLabel.compoundDrawables[0],
|
||||
rightTextColor = rightTextColor,
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
NAME=4.2
|
||||
CODE=5961
|
||||
CODE=5991
|
||||
Loading…
Reference in a new issue