Use stricter visibility for composables where possible

This commit is contained in:
arkon
2023-03-05 18:41:08 -05:00
parent e458de5e9c
commit 9b77759f24
28 changed files with 274 additions and 308 deletions

View File

@@ -9,7 +9,7 @@ import androidx.compose.ui.zIndex
import eu.kanade.tachiyomi.R
@Composable
fun GlobalSearchItem(
internal fun GlobalSearchItem(
searchQuery: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,

View File

@@ -12,7 +12,7 @@ import tachiyomi.presentation.core.components.FastScrollLazyVerticalGrid
import tachiyomi.presentation.core.util.plus
@Composable
fun LazyLibraryGrid(
internal fun LazyLibraryGrid(
modifier: Modifier = Modifier,
columns: Int,
contentPadding: PaddingValues,
@@ -28,7 +28,7 @@ fun LazyLibraryGrid(
)
}
fun LazyGridScope.globalSearchItem(
internal fun LazyGridScope.globalSearchItem(
searchQuery: String?,
onGlobalSearchClicked: () -> Unit,
) {

View File

@@ -10,7 +10,7 @@ import tachiyomi.presentation.core.components.Badge
import tachiyomi.presentation.core.util.ThemePreviews
@Composable
fun DownloadsBadge(count: Long) {
internal fun DownloadsBadge(count: Long) {
if (count > 0) {
Badge(
text = "$count",
@@ -21,14 +21,14 @@ fun DownloadsBadge(count: Long) {
}
@Composable
fun UnreadBadge(count: Long) {
internal fun UnreadBadge(count: Long) {
if (count > 0) {
Badge(text = "$count")
}
}
@Composable
fun LanguageBadge(
internal fun LanguageBadge(
isLocal: Boolean,
sourceLanguage: String,
) {

View File

@@ -11,7 +11,7 @@ import tachiyomi.domain.library.model.LibraryManga
import tachiyomi.domain.manga.model.MangaCover
@Composable
fun LibraryComfortableGrid(
internal fun LibraryComfortableGrid(
items: List<LibraryItem>,
columns: Int,
contentPadding: PaddingValues,

View File

@@ -11,7 +11,7 @@ import tachiyomi.domain.library.model.LibraryManga
import tachiyomi.domain.manga.model.MangaCover
@Composable
fun LibraryCompactGrid(
internal fun LibraryCompactGrid(
items: List<LibraryItem>,
showTitle: Boolean,
columns: Int,

View File

@@ -15,7 +15,7 @@ import tachiyomi.presentation.core.components.FastScrollLazyColumn
import tachiyomi.presentation.core.util.plus
@Composable
fun LibraryList(
internal fun LibraryList(
items: List<LibraryItem>,
contentPadding: PaddingValues,
selection: List<LibraryManga>,

View File

@@ -13,7 +13,7 @@ import tachiyomi.presentation.core.components.material.TabIndicator
import tachiyomi.presentation.core.components.material.TabText
@Composable
fun LibraryTabs(
internal fun LibraryTabs(
categories: List<Category>,
currentPageIndex: Int,
getNumberOfMangaForCategory: (Category) -> Int?,

View File

@@ -63,7 +63,7 @@ fun LibraryToolbar(
}
@Composable
fun LibraryRegularToolbar(
private fun LibraryRegularToolbar(
title: LibraryToolbarTitle,
hasFilters: Boolean,
searchQuery: String?,
@@ -130,7 +130,7 @@ fun LibraryRegularToolbar(
}
@Composable
fun LibrarySelectionToolbar(
private fun LibrarySelectionToolbar(
selectedCount: Int,
onClickUnselectAll: () -> Unit,
onClickSelectAll: () -> Unit,