mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-19 15:12:36 -07:00
e21414b2294e7d010b7c3d0a34eb926df7fbc3e4
eu.kanade.tachiyomi.data.database.models.Chapter predates SQLDelight. It survived because it implements SChapter, so ReaderChapter could hand the same object to the database and to the source. ReaderChapter now holds the domain Chapter and converts at the three points that actually need a source model: getPageList, getFormat and getChapterUrl. The domain model is immutable, so the reader replaces the chapter rather than writing through it, behind an update function so the field cannot be reassigned from outside. Equality stays on the chapter it was loaded with, which keeps the identity comparisons in the viewers stable while progress is recorded against it. updateChapterProgress no longer mutates the chapter and reads the values straight back out to build the update it persists; it computes them once and passes them. Marking a chapter read moves out of the function named for completing it and into the same place the page is recorded. Removing the interface also drops the nullable id it carried, along with three non-null assertions and a Float to Double conversion that the compiler had been warning about. A page position is an index into a chapter's pages, so it cannot exceed Int range, but SQLite has one integer type and the column came back as a Long. That width reached the domain model and then every caller either carried it or converted, and the viewers had to narrow it again to index a list with. Declaring the column INTEGER AS Int moves the narrowing into a column adapter, so it happens once where the value stops being a database number. No migration: SQLite still stores an INTEGER, only the type SQLDelight generates changes. Backups are the exception and keep converting, because the field is on the wire as int64 and has to stay that way. That is also the only place the value arrives from outside the app, where a malformed file could carry something that does not fit and truncate to a negative index, so it is clamped rather than cast.
Mihon App
Full-featured reader
Discover and read manga, webtoons, comics, and more – easier than ever on your Android device.
Download
Requires Android 8.0 or higher.
Features
- Local reading of content.
- A configurable reader with multiple viewers, reading directions and other settings.
- Tracker support: MangaBaka, MyAnimeList, AniList, Kitsu, MangaUpdates, Shikimori, Bangumi, and Hikka support.
- Categories to organize your library.
- Light and dark themes.
- Schedule updating your library for new chapters.
- Create backups locally to read offline or to your desired cloud service.
- Plus much more...
Contributing
Code of conduct · Contributing guide
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Before reporting a new issue, take a look at the FAQ, the changelog and the already opened issues; if you got any questions, join our Discord server.
Repositories
Credits
Thank you to all the people who have contributed!
Disclaimer
The developer(s) of this application does not have any affiliation with the content providers available, and this application hosts zero content.
License
Copyright © 2015 Javier Tomás Copyright © 2024 Mihon Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Description
No description provided
androidkotlinmangamanga-downloadermangadownloadermanga-readermangareadertachiyomitachiyomi-alternative
Readme
129 MiB
Languages
Kotlin
100%