Resolve review comments for BrowseSourceScreens (#7912)
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
package eu.kanade.presentation.browse
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.glance.LocalContext
|
||||
import eu.kanade.domain.manga.model.Manga
|
||||
import eu.kanade.tachiyomi.source.online.HttpSource
|
||||
import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourcePresenter
|
||||
import eu.kanade.tachiyomi.ui.webview.WebViewActivity
|
||||
|
||||
@Composable
|
||||
fun SourceSearchScreen(
|
||||
@@ -11,6 +14,8 @@ fun SourceSearchScreen(
|
||||
onFabClick: () -> Unit,
|
||||
onClickManga: (Manga) -> Unit,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
BrowseSourceScreen(
|
||||
presenter = presenter,
|
||||
navigateUp = navigateUp,
|
||||
@@ -18,5 +23,10 @@ fun SourceSearchScreen(
|
||||
onFabClick = onFabClick,
|
||||
onMangaClick = onClickManga,
|
||||
onMangaLongClick = onClickManga,
|
||||
onWebViewClick = f@{
|
||||
val source = presenter.source as? HttpSource ?: return@f
|
||||
val intent = WebViewActivity.newIntent(context, source.baseUrl, source.id, source.name)
|
||||
context.startActivity(intent)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user