Increase limitation of Feed from 10 to 20

Also fix limtation message spelling
This commit is contained in:
Cuong M. Tran 2024-01-31 11:08:04 +07:00
parent b6a60201b6
commit 27a1c3aa76
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
3 changed files with 6 additions and 3 deletions

View file

@ -150,7 +150,7 @@ open class FeedScreenModel(
}
private suspend fun hasTooManyFeeds(): Boolean {
return countFeedSavedSearchGlobal.await() > 10
return countFeedSavedSearchGlobal.await() > MAX_FEED_ITEMS
}
fun getEnabledSources(): ImmutableList<CatalogueSource> {
@ -323,3 +323,5 @@ data class FeedScreenState(
val isLoadingItems
get() = items?.fastAny { it.results == null } != false
}
const val MAX_FEED_ITEMS = 20

View file

@ -17,6 +17,7 @@ import eu.kanade.presentation.browse.SourceFeedUI
import eu.kanade.tachiyomi.source.CatalogueSource
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.online.all.MangaDex
import eu.kanade.tachiyomi.ui.browse.feed.MAX_FEED_ITEMS
import exh.source.getMainSource
import exh.source.mangaDexSourceIds
import exh.util.nullIfBlank
@ -107,7 +108,7 @@ open class SourceFeedScreenModel(
}
private suspend fun hasTooManyFeeds(): Boolean {
return countFeedSavedSearchBySourceId.await(source.id) > 10
return countFeedSavedSearchBySourceId.await(source.id) > MAX_FEED_ITEMS
}
fun createFeed(savedSearchId: Long) {

View file

@ -374,7 +374,7 @@
<!-- Feed Tab -->
<string name="feed">Feed</string>
<string name="feed_delete">Delete feed item?</string>
<string name="too_many_in_feed">Too many sources in your feed, cannot add more then 10</string>
<string name="too_many_in_feed">Too many sources in your feed, cannot add more than limited</string>
<string name="feed_tab_empty">You don\'t have any sources in your feed, navigate to the top right to add one</string>
<string name="feed_add">Add %1$s to feed?</string>