Include source headers when opening failed images from reader (#2004)

This commit is contained in:
AwkwardPeak7
2025-04-13 22:05:42 +05:00
committed by GitHub
parent e273a26c9b
commit fea85241af
3 changed files with 7 additions and 2 deletions

View File

@ -25,6 +25,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
- Deduplicate entries when browsing ([@AntsyLich](https://github.com/AntsyLich)) ([#1957](https://github.com/mihonapp/mihon/pull/1957))
- Update non-library manga data when browsing ([@AntsyLich](https://github.com/AntsyLich)) ([#1967](https://github.com/mihonapp/mihon/pull/1967))
- Surface image loading error in Reader ([@AwkwardPeak7](https://github.com/AwkwardPeak7)) ([#1981](https://github.com/mihonapp/mihon/pull/1981))
- Include source headers when opening failed images from reader ([@AwkwardPeak7](https://github.com/AwkwardPeak7)) ([#2004](https://github.com/mihonapp/mihon/pull/2004))
### Changed
- Display all similarly named duplicates in duplicate manga dialogue ([@NarwhalHorns](https://github.com/NarwhalHorns), [@AntsyLich](https://github.com/AntsyLich)) ([#1861](https://github.com/mihonapp/mihon/pull/1861))

View File

@ -286,7 +286,9 @@ class PagerPageHolder(
if (imageUrl.startsWith("http", true)) {
errorLayout?.actionOpenInWebView?.viewer = viewer
errorLayout?.actionOpenInWebView?.setOnClickListener {
val intent = WebViewActivity.newIntent(context, imageUrl)
val sourceId = viewer.activity.viewModel.manga?.source
val intent = WebViewActivity.newIntent(context, imageUrl, sourceId)
context.startActivity(intent)
}
}

View File

@ -290,7 +290,9 @@ class WebtoonPageHolder(
if (imageUrl != null) {
if (imageUrl.startsWith("http", true)) {
errorLayout?.actionOpenInWebView?.setOnClickListener {
val intent = WebViewActivity.newIntent(context, imageUrl)
val sourceId = viewer.activity.viewModel.manga?.source
val intent = WebViewActivity.newIntent(context, imageUrl, sourceId)
context.startActivity(intent)
}
}