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,
)
}
}