mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-04-14 19:56:32 +00:00
fix task summary
This commit is contained in:
parent
7a1541ac84
commit
06c3bdb2c4
5 changed files with 14 additions and 12 deletions
|
|
@ -73,7 +73,7 @@ dependencies {
|
|||
|
||||
androidTestImplementation 'androidx.test:runner:1.5.2'
|
||||
androidTestImplementation 'androidx.test:rules:1.5.0'
|
||||
debugImplementation 'androidx.fragment:fragment-testing:1.5.5'
|
||||
debugImplementation 'androidx.fragment:fragment-testing:1.5.6'
|
||||
androidTestImplementation 'androidx.test:core-ktx:1.5.0'
|
||||
debugImplementation "androidx.test:monitor:1.6.1"
|
||||
androidTestImplementation 'androidx.test.ext:junit-ktx:1.1.5'
|
||||
|
|
@ -106,7 +106,7 @@ dependencies {
|
|||
implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"
|
||||
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_version"
|
||||
implementation "androidx.navigation:navigation-ui-ktx:$navigation_version"
|
||||
implementation "androidx.fragment:fragment-ktx:1.5.5"
|
||||
implementation "androidx.fragment:fragment-ktx:1.5.6"
|
||||
implementation "androidx.paging:paging-runtime-ktx:3.1.1"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
|
||||
|
|
@ -114,9 +114,9 @@ dependencies {
|
|||
implementation "androidx.compose.material3:material3:1.0.1"
|
||||
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist_version"
|
||||
|
||||
implementation 'androidx.activity:activity-compose:1.6.1'
|
||||
implementation 'androidx.activity:activity-compose:1.7.0'
|
||||
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
|
||||
implementation "androidx.compose.material:material:1.3.1"
|
||||
implementation "androidx.compose.material:material:1.4.0"
|
||||
implementation "androidx.compose.animation:animation:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-text-google-fonts:$compose_version"
|
||||
implementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
|
|
@ -163,7 +163,7 @@ android {
|
|||
}
|
||||
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.4.2"
|
||||
kotlinCompilerExtensionVersion = "1.4.4"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class DeathActivity : BaseActivity() {
|
|||
binding.lossDescription.text = getString(R.string.faint_loss_description, (user?.stats?.lvl ?: 2).toInt() - 1, user?.stats?.gp?.toInt()).fromHtml()
|
||||
}
|
||||
|
||||
if (appConfigManager.enableArmoireAds()) {
|
||||
if (appConfigManager.enableFaintAds()) {
|
||||
val handler = AdHandler(this, AdType.FAINT) {
|
||||
if (!it) {
|
||||
return@AdHandler
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ import androidx.compose.ui.text.font.FontWeight
|
|||
import androidx.compose.ui.text.withStyle
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import androidx.lifecycle.SavedStateHandle
|
||||
import androidx.lifecycle.asLiveData
|
||||
import com.google.accompanist.systemuicontroller.rememberSystemUiController
|
||||
import com.habitrpg.android.habitica.R
|
||||
|
|
@ -65,12 +66,13 @@ import javax.inject.Inject
|
|||
|
||||
@HiltViewModel
|
||||
class TaskSummaryViewModel @Inject constructor(
|
||||
savedStateHandle: SavedStateHandle,
|
||||
userRepository : UserRepository,
|
||||
userViewModel : MainUserViewModel,
|
||||
val taskRepository : TaskRepository,
|
||||
val socialRepository : SocialRepository
|
||||
) : BaseViewModel(userRepository, userViewModel) {
|
||||
val taskID : String = ""
|
||||
val taskID: String = savedStateHandle[TaskFormActivity.TASK_ID_KEY] ?: ""
|
||||
|
||||
val task = taskRepository.getTask(taskID).asLiveData()
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ buildscript {
|
|||
amplitude_version = '1.6.1'
|
||||
appcompat_version = '1.6.1'
|
||||
coil_version = '2.2.2'
|
||||
compose_version = '1.3.3'
|
||||
compose_version = '1.4.0'
|
||||
core_ktx_version = '1.9.0'
|
||||
coroutines_version = '1.6.4'
|
||||
daggerhilt_version = '2.44.2'
|
||||
firebase_bom = '31.2.0'
|
||||
firebase_bom = '31.3.0'
|
||||
kotest_version = '5.5.5'
|
||||
kotlin_version = '1.8.10'
|
||||
ktlint_version = '0.48.2'
|
||||
|
|
@ -50,7 +50,7 @@ buildscript {
|
|||
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigation_version"
|
||||
classpath 'com.google.firebase:perf-plugin:1.4.2'
|
||||
classpath "com.google.dagger:hilt-android-gradle-plugin:$daggerhilt_version"
|
||||
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.1.0"
|
||||
classpath "org.jlleitschuh.gradle:ktlint-gradle:11.3.1"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ class ConfirmactionActivityViewModel @Inject constructor(
|
|||
exceptionBuilder: ExceptionHandlerBuilder,
|
||||
appStateManager: AppStateManager
|
||||
) : BaseViewModel(userRepository, taskRepository, exceptionBuilder, appStateManager) {
|
||||
val icon: Int = savedStateHandle.get("icon") ?: R.drawable.error
|
||||
val text: String? = savedStateHandle.get("text")
|
||||
val icon: Int = savedStateHandle["icon"] ?: R.drawable.error
|
||||
val text: String? = savedStateHandle["text"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue