mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 11:46:32 +00:00
fix showing set item
This commit is contained in:
parent
19b5166dd2
commit
0759a071cb
5 changed files with 21 additions and 19 deletions
|
|
@ -187,10 +187,11 @@ android {
|
|||
// Disable fabric build ID generation for debug builds
|
||||
ext.enableCrashlytics = false
|
||||
ext.alwaysUpdateBuildId = false
|
||||
testCoverageEnabled = false
|
||||
//resValue "string", "content_provider", "com.habitrpg.android.habitica.debug.fileprovider"
|
||||
resValue "string", "content_provider", "com.habitrpg.android.habitica.fileprovider"
|
||||
resValue "string", "app_name", "Habitica Debug"
|
||||
enableUnitTestCoverage false
|
||||
enableAndroidTestCoverage false
|
||||
}
|
||||
debugIAP {
|
||||
signingConfig signingConfigs.release
|
||||
|
|
|
|||
|
|
@ -469,9 +469,9 @@ class RealmInventoryLocalRepository(realm: Realm) :
|
|||
.toFlow()
|
||||
.filter { it.isLoaded }
|
||||
.map {
|
||||
val format = SimpleDateFormat("yyyyMM", Locale.US)
|
||||
it.firstOrNull() { set ->
|
||||
set.key.contains(format.format(Date()))
|
||||
val dateString = SimpleDateFormat("yyyyMM", Locale.US).format(Date())
|
||||
it.firstOrNull { set ->
|
||||
set.key.contains(dateString)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import dagger.hilt.InstallIn
|
|||
import dagger.hilt.android.EntryPointAccessors
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import kotlinx.coroutines.MainScope
|
||||
import kotlinx.coroutines.flow.firstOrNull
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
|
|
@ -54,18 +54,19 @@ class SubscriberBenefitView
|
|||
inventoryRepository = hiltEntryPoint.inventoryRepository()
|
||||
|
||||
MainScope().launchCatching {
|
||||
val pair = inventoryRepository.getLatestMysteryItemAndSet().firstOrNull()
|
||||
val item = pair?.first
|
||||
val set = pair?.second
|
||||
binding.subBenefitsMysteryItemIcon.loadImage(
|
||||
"shop_set_mystery_${
|
||||
item?.key?.split(
|
||||
"_",
|
||||
)?.last()
|
||||
}",
|
||||
)
|
||||
binding.subBenefitsMysteryItemText.text =
|
||||
context.getString(R.string.subscribe_listitem3_description_alt, monthFormatter.format(Date()), set?.text ?: context.getString(R.string.set))
|
||||
inventoryRepository.getLatestMysteryItemAndSet().collectLatest { pair ->
|
||||
val item = pair.first
|
||||
val set = pair.second
|
||||
binding.subBenefitsMysteryItemIcon.loadImage(
|
||||
"shop_set_mystery_${
|
||||
item.key?.split(
|
||||
"_",
|
||||
)?.last()
|
||||
}",
|
||||
)
|
||||
binding.subBenefitsMysteryItemText.text =
|
||||
context.getString(R.string.subscribe_listitem3_description_alt, monthFormatter.format(Date()), set?.text ?: context.getString(R.string.set))
|
||||
}
|
||||
}
|
||||
binding.subBenefitsMysteryItemText.text =
|
||||
context.getString(R.string.subscribe_listitem3_description_alt, monthFormatter.format(Date()), context.getString(R.string.set))
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ buildscript {
|
|||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.5.2'
|
||||
classpath 'com.android.tools.build:gradle:8.7.2'
|
||||
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
|
||||
classpath 'com.google.gms:google-services:4.4.2'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
|
||||
|
|
|
|||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
|||
#Mon Jun 10 15:25:21 CEST 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
|||
Loading…
Reference in a new issue