mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Minor cleanup
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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?
|
||||
)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user