KaiserBh ba75395648 refactor: improve sync merging categories (#1559)
* feat: Add versioning to categories

* feat: use random UID for categories.

For legacy and migration we should assign uid on insert, and modify existing one as well in the migration.

* feat: sync category metadata

Add version, uid and lastModifiedAt fields to Category model to allow syncing.

* chore: fix category merging logic

Improve the category merging logic by matching using UIDs first, with a fallback to matching by name for legacy remote categories.

Previously, categories were only matched by name, which could lead to incorrect merges if names were changed. This change ensures more accurate synchronization by prioritizing the unique identifier. Conflict resolution is now based on the `version` field, and logging has been added for better visibility into the merging process.

* refactor: prioritize UID when restoring categories

If a category with the same UID exists, update it instead of creating a new one. Fallback to matching by name if no UID match is found.

* chore: add isSyncing flag like before.

This make sure the version is consistent, and it's not accidentally appended by the trigger, if it does then one device will always be ahead, than previous, and they need to make multiple changes to increase the version.

* Apply suggestion from @jobobby04

Use SY specific numbers(601, 602 for now)

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>

* chore: commit review, re-order.

* chore: surround changes in // SY --> // SY <--

* refactor: fallback to existing category UID if backup UID is 0 during restore.

when dealing with old backups (backups created before we added UIDs). In those old backups, backupCategory.uid defaults to 0.
If a user restored an old backup, it would match by name, and then overwrite the newly generated local UID with 0. This would break the synchronization.

* refactor: change to 6xx

* feat: improve sync reliability for categories and settings

- Refactor `mergeCategoriesLists` to correctly match categories by name when UID matching fails, ensuring better reconciliation across devices.
- Fix a bug in category merging where multiple categories with UID 0 (common for non-synced items) caused data loss.
- Update `SyncManager` to detect changes in categories, sources, preferences, saved searches, and extension repos, ensuring they synchronize even when the library favorites haven't changed.
- Convert `BackupCategory` and `BackupExtensionRepos` to data classes to support robust content-aware comparison during the sync process.
- Fix data loss in `mergeSourcesLists`, `mergePreferencesLists`, and `mergeSavedSearchesLists` by retaining local versions when conflicting with remote data.

* fix(sync): properly sync category deletions across devices

Previously, the sync system could not distinguish between a category that was deleted locally and a new category created on another device, causing deleted categories to be restored from the remote backup.

- Update `SyncService` to use `lastSyncTimestamp` to deduce if a missing local category was deleted (if modified before last sync) or newly created remotely (if modified after).
- Update `SyncManager` to explicitly delete local categories that are absent from the merged remote backup, propagating deletions to other devices.
- Fix `RestoreOptions` in `SyncManager` to respect the user's sync preferences instead of hardcoding `categories = true`.

* chore: change it to 6xx and not 600.

* chore: don't need to change this.

* chore: use kotlin time duration units

---------

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
2026-04-03 12:49:37 -04:00
2023-10-01 16:36:37 -04:00
2024-10-14 19:10:41 -04:00
2026-03-18 19:47:20 -04:00
2024-10-14 19:10:41 -04:00
2025-12-05 13:44:58 -05:00
2025-11-16 18:14:20 +05:45
2020-01-11 16:13:08 -05:00
2024-10-14 19:10:41 -04:00
2024-01-13 16:39:52 -05:00
2024-09-01 10:45:11 -04:00
2025-01-21 14:47:39 -05:00
2025-12-25 16:49:01 -05:00

Preview Builds Release Builds Mihon Support Server
Preview stable release Discord

app iconTachiyomiSY

Mihon is a free and open source manga reader for Android 6.0 and above. This version of Mihon, TachiyomiSY was based off TachiyomiAZ. This version is meant to push forward in the ways of usability and features. TachiyomiSY tries to push forward where it can, but staying in a place where it can easily grab updates and features from the main app, it tries to make new features, or take features from other forks like J2K and Neko.

screenshots of app

Features

Features of Mihon(original) include:

  • Online reading from a variety of sources
  • Local reading of downloaded content
  • A configurable reader with multiple viewers, reading directions and other settings.
  • Tracker support: MyAnimeList, AniList, Kitsu, MangaUpdates, Shikimori, and Bangumi 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

Features of TachiyomiSY include:

  • Latest tab, store up to 5 sources where you can easily view the latest manga by viewing the tab
  • Automatic webtoon detection, allowing the reader to switch to webtoon mode automatically when viewing one
  • Manga recommendations, uses MAL and Anilist, as well as Neko Similar Manga for Mangadex manga(Thanks to Az, She11Shocked, Carlos, and Goldbattle)
  • Lewd filter, hide the lewd manga in your library when you want to
  • Tracking filter, filter your tracked manga so you can see them or see non-tracked manga, made by She11Shocked
  • Search tracking status in library, made by She11Shocked
  • Custom categories for sources, liked the pinned sources, but you can make your own versions and put any sources in them
  • Manga info edit
  • Manga Cover view + share and save
  • Dynamic Categories, view the library in multiple ways
  • Smart background for reading modes like LTR or Vertical, changes the background based on the page color
  • Force disable webtoon zoom
  • Continue reading button in library
  • Hentai features enable/disable, in advanced settings
  • Quick clean titles
  • Source migration, migrate all your manga from one source to another
  • Saving searches
  • Autoscroll
  • Page preload customization
  • Customize image cache size
  • Batch import of custom sources and featured extensions
  • Advanced source settings page, searching, enable/disable all
  • Click tag for local search, long click tag for global search
  • Merge multiple of the same manga from different sources
  • Drag and drop library sorting
  • Library search engine, includes exclude, quotes as absolute, and a bunch of other ways to search
  • New E-Hentai/ExHentai features, such as language settings and watched list settings
  • Enhanced views for internal and integrated sources
  • Enhanced usability for internal and delegated sources

Custom sources:

  • E-Hentai/ExHentai

Additional features for some extensions, features include custom description, opening in app, batch add to library, and a bunch of other things based on the source:

  • 8Muses (EroMuse)
  • HBrowse
  • Mangadex
  • NHentai
  • Puruin
  • LANraragi

Download

Get the app from our releases page.

If you want to try new features before they get to the stable release, you can download the preview version here.

Translation

Feel free to translate the project on Weblate

Translation Progress Translation status

Issues, Feature Requests and Contributing

Please make sure to read the full guidelines. Your issue may be closed without warning if you do not.

Issues
  1. Before reporting a new issue, take a look at the FAQ, the changelog and the already opened issues.
  2. If you are unsure, ask here: Discord
Bugs
  • Include version (More → About → Version)
  • If not latest, try updating, it may have already been solved
  • Preview version is equal to the number of commits as seen on the main page
  • Include steps to reproduce (if not obvious from description)
  • Include screenshot (if needed)
  • If it could be device-dependent, try reproducing on another device (if possible)
  • Don't group unrelated requests into one issue

Use the issue forms to submit a bug.

Feature Requests
  • Write a detailed issue, explaining what it should do or how. Avoid writing just "like X app does"
  • Include screenshot (if needed)

Source requests are not accepted.

Contributing

See CONTRIBUTING.md.

Code of Conduct

See CODE_OF_CONDUCT.md.

FAQ

See our website. You can also reach out to us on Discord.

S
Description
No description provided
Readme 95 MiB
Languages
Kotlin 100%