Minor cleanup

This commit is contained in:
Syer10
2022-12-22 16:44:38 -05:00
parent 644019850b
commit 0c58727dd5
3 changed files with 3 additions and 5 deletions

View File

@@ -49,7 +49,7 @@ fun Context.notificationBuilder(channelId: String, block: (NotificationCompat.Bu
/**
* Helper method to create a notification.
*
* @param id the channel id.
* @param channelId the channel id.
* @param block the function that will execute inside the builder.
* @return a notification to be displayed or updated.
*/

View File

@@ -41,7 +41,7 @@ data class Manga(
val unreadCount: Int?,
val downloadCount: Int?,
val chapterCount: Int?,
var lastChapterRead: Chapter?,
val lastChapterRead: Chapter?,
val age: Long?,
val chaptersAge: Long?
)

View File

@@ -74,8 +74,7 @@ class ExtensionsScreenViewModel @Inject constructor(
langs.map { it.lang }.distinct().toImmutableList()
}.stateIn(scope, SharingStarted.Eagerly, persistentListOf())
private val _isLoading = MutableStateFlow(true)
val isLoading = _isLoading.asStateFlow()
val isLoading = extensionList.map { it == null }.stateIn(scope, SharingStarted.Eagerly, true)
init {
scope.launch {
@@ -85,7 +84,6 @@ class ExtensionsScreenViewModel @Inject constructor(
private suspend fun getExtensions() {
extensionList.value = getExtensionList.await(onError = { toast(it.message.orEmpty()) }).orEmpty()
_isLoading.value = false
}
fun install(source: Source) {