Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Fallback Image for broken Thumbnails #50

Merged
merged 3 commits into from
Oct 26, 2021

Conversation

ntbm
Copy link
Contributor

@ntbm ntbm commented Oct 26, 2021

Added a Fallback Image for the MangaCard onError, this allows the proper css scalings to work and thus fixing the scaling issue.
Fixes: #49

Please ignore the Backbutton next to the Library Label. This is not included in this PR

Before

Bildschirmfoto 2021-10-26 um 19 36 33

After

Bildschirmfoto 2021-10-26 um 19 33 22

@AriaMoradi
Copy link
Member

Not showing anything is the default behavior of Tachiyomi.
That image is really bad..

@ntbm
Copy link
Contributor Author

ntbm commented Oct 26, 2021

I agree the Image is really bad. Though we still need a Fallback. I cloud just make an complete transparent svg/png so the scaling works properly.

@Syer10
Copy link
Contributor

Syer10 commented Oct 26, 2021

How about doing what JUI does and show a Kaomoji?

@Syer10
Copy link
Contributor

Syer10 commented Oct 26, 2021

JUI has this to get a random Kaomoji to display

private val ERROR_FACES = arrayOf(
    "(・o・;)",
    "Σ(ಠ_ಠ)",
    "ಥ_ಥ",
    "(˘・_・˘)",
    "(; ̄Д ̄)",
    "(・Д・。"
)

fun getRandomErrorFace(): String {
    return ERROR_FACES[Random.nextInt(ERROR_FACES.size)]
}

@AriaMoradi
Copy link
Member

JUI has this to get a random Kaomoji to display

We already have those in EmptyView

@ntbm
Copy link
Contributor Author

ntbm commented Oct 26, 2021

Same Solution now with transparency

Bildschirmfoto 2021-10-26 um 21 32 06

@ntbm
Copy link
Contributor Author

ntbm commented Oct 26, 2021

Added some comments for context

@AriaMoradi AriaMoradi merged commit 9875cbd into Suwayomi:master Oct 26, 2021
@ntbm ntbm deleted the fix-squishy-cards branch October 27, 2021 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] MangaCard scaling in MangaGrid doesn't work
3 participants