TachiyomiSY Documentation

repository·master·Indexed 26 days ago

https://github.com/jobobby04/tachiyomisy

An open-source manga reader for Android 8.0+ based on the Mihon/Tachiyomi ecosystem. It features automatic webtoon detection, advanced library filtering, and enhanced source support. The documentation covers installation, bug reporting, translation contributions, and technical implementation details regarding the Coil ImageLoader configuration and dependency injection using Injekt and Koin.

Tokens
1.4K
Snippets
1
Records
6
Agent score
38%

What's inside TachiyomiSY

  1. Manage Incognito Mode Notifications

    master

    The application monitors the incognitoMode preference. When enabled, it registers a DisableIncognitoReceiver and displays an ongoing notification to inform the user.

    • Notification ID: Notifications.ID_INCOGNITO_MODE
    • Notification Channel: Notifications.CHANNEL_INCOGNITO_MODE
    • Action: Tapping the notification triggers a broadcast with the action tachi.action.DISABLE_INCOGNITO_MODE, which disables Incognito Mode.

    When Incognito Mode is disabled, the notification is cancelled and the receiver is unregistered.

  2. Initialize Dependency Injection with Injekt and Koin

    master

    The application uses a combination of Injekt and Koin for dependency injection. During onCreate, the following modules are imported into the Injekt container:

    • PreferenceModule(this)
    • AppModule(this)
    • DomainModule()
    • SYPreferenceModule(this) (SY specific)
    • SYDomainModule() (SY specific)

    After Injekt is configured, InjektKoinBridge.startKoin(this) is called to bridge the two DI frameworks.

  3. Report a bug in TachiyomiSY

    master

    When reporting a bug, follow these steps to ensure it can be addressed:

    1. Check existing resources: Review the FAQ, the changelog, and existing issues to see if the problem is already known.
    2. Provide version info: Include your app version (found via MoreAboutVersion).
    3. Reproduce the issue: Include clear steps to reproduce the bug and provide screenshots if necessary.
    4. Use Issue Forms: It is recommended to use the official issue forms for bug reports.

    Note: Source requests are not accepted. Note: If you are using a preview version, the version number corresponds to the number of commits on the main page.

  4. Configure the Coil ImageLoader

    master

    The App class implements SingletonImageLoader.Factory to provide a custom ImageLoader for the application. This configuration includes specialized fetchers and decoders for manga covers and page previews, as well as memory cache management and coroutine context limits to optimize performance.

    Key components configured:

    • OkHttpNetworkFetcherFactory: Uses the application's NetworkHelper client.
    • TachiyomiImageDecoder:
    • BufferedSourceFetcher:
    • MangaCoverFetcher (MangaCoverFactory and MangaFactory):
    • PagePreviewFetcher and PagePreviewKeyer:
    • MangaCoverKeyer and MangaKeyer:

    Performance settings:

    • memoryCache: Uses a percentage of the available context memory.
    • crossfade: Duration is scaled by animatorDurationScale.
    • allowRgb565: Enabled on low-RAM devices.
    • fetcherCoroutineContext: Limited to 8 parallel threads on Dispatchers.IO.
    • decoderCoroutineContext: Limited to 3 parallel threads on Dispatchers.IO.
    override fun newImageLoader(context: Context): ImageLoader {
        return ImageLoader.Builder(this).apply {
            val callFactoryLazy = lazy { Injekt.get<NetworkHelper>().client }
            components {
                add(OkHttpNetworkFetcherFactory(callFactoryLazy::value))
                add(TachiyomiImageDecoder.Factory())
                add(BufferedSourceFetcher.Factory())
                add(MangaCoverFetcher.MangaCoverFactory(callFactoryLazy))
                add(MangaCoverFetcher.MangaFactory(callFactoryLazy))
                add(PagePreviewFetcher.Factory(callFactoryLazy))
                add(MangaCoverKeyer())
                add(MangaKeyer())
                add(PagePreviewKeyer())
            }
            memoryCache(MemoryCache.Builder().maxSizePercent(context).build())
            crossfade((300 * this@App.animatorDurationScale).toInt())
            allowRgb565(DeviceUtil.isLowRamDevice(this))
            if (networkPreferences.verboseLogging.get()) logger(DebugLogger())
            fetcherCoroutineContext(Dispatchers.IO.limitedParallelism(8))
            decoderCoroutineContext(Dispatchers.IO.limitedParallelism(3))
        }.build()
    }