Show last error in tracker log

This commit is contained in:
Koitharu
2024-07-13 06:16:26 +03:00
parent d8fa0e33f1
commit 4102c4a0ae
4 changed files with 4 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ fun trackDebugAD(
append(" - ")
bold {
color(context.getThemeColor(materialR.attr.colorError, Color.RED)) {
append(getString(R.string.error))
append(item.lastError ?: getString(R.string.error))
}
}
}

View File

@@ -11,6 +11,7 @@ data class TrackDebugItem(
val lastCheckTime: Instant?,
val lastChapterDate: Instant?,
val lastResult: Int,
val lastError: String?,
) : ListModel {
override fun areItemsTheSame(other: ListModel): Boolean {

View File

@@ -31,6 +31,7 @@ class TrackerDebugViewModel @Inject constructor(
lastCheckTime = it.track.lastCheckTime.toInstantOrNull(),
lastChapterDate = it.track.lastChapterDate.toInstantOrNull(),
lastResult = it.track.lastResult,
lastError = it.track.lastError,
)
}
}

View File

@@ -4,7 +4,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.5.0'
classpath 'com.android.tools.build:gradle:8.5.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.24'
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.51.1'
classpath 'com.google.devtools.ksp:symbol-processing-gradle-plugin:1.9.24-1.0.20'