Commit graph

12 commits

Author SHA1 Message Date
Cuong-Tran
f373818d93
feat(history): Add Filters to History screen (#1433)
* Add Filters to History screen

* Revert favorite condition
2026-01-28 16:43:07 +07:00
MajorTanya
3e7dc5c41a Add Filters to Updates screen (mihonapp/mihon#2851)
* Add Filters to Updates screen

Behaves basically like the filters in the library:

- Unread: Show/Don't show unread chapters
- Downloaded: Show/Don't show downloaded chapters
- Started: Show/Don't show chapters that have some progress but aren't
  fully Read
- Bookmarked: Show/Don't show chapters that have been bookmarked

Started behaves differently from its Library counterpart because the
actual manga data is not available at this point in time and I thought
calling getManga for each entry without caching would be a pretty bad
idea.

I have modelled this closely on the filter control flow in the
Library, but I'm sure this can be simplified/adjusted in some way.

* Move most filtering logic to SQL

Unread, Started, and Bookmarked filters are now part of the SQL query.

Download state cannot be filtered in the database so it remains in
Kotlin.

Because the Downloaded filter has to be run in Kotlin, the combine
flow uses the preferences flow twice, once to get the SQL query params
and once for the Kotlin filters (only Downloaded at this time).

* Add "Hide excluded scanlators" to update filters

Based on the work done in mihonapp/mihon#1623 but integrated with the other filters
in this PR. Added the user as a co-author for credit.

Co-authored-by: Dani <17619547+shabnix@users.noreply.github.com>

---------

Co-authored-by: Dani <17619547+shabnix@users.noreply.github.com>

---------

* Merge Panorama toggle into Filter diaglog
* Make Panorama toggle persistent and share it with History
* Implement toggleSwitch method for preference management to avoid create new function on every composition

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

(cherry picked from commit bbe9aa8561360f030072fbc49f79748e71c6535e)
2026-01-28 12:41:18 +07:00
kana-shii
c41d5fb847
feat(discord): Discord RPC from Anikku (#1100)
* Add RPC [Barebone, barely works]

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* refactor connections

* RPC (#223)

* Add error handling and refactor DiscordRPCService methods

* Add Discord RPC customization options and preferences

* Update Discord RPC button labels and clean up comments

* Refactor DiscordRPCService to improve readability by adding braces for null checks

* Refactor ConnectionsPreferences to improve code clarity and organization

* Refactor ConnectionsPreferences to improve code clarity and organization

(cherry picked from commit df42d196368d28c3c9dcee3692f3f9140da7f2a1)

* Feat: implement Discord account management enhancements and RPC restart functionality (#245)

* fix: correct indentation in CastManager for better readability

* feat: implement Discord account management enhancements and RPC restart functionality

(cherry picked from commit b7c50f1f0184dd717c5cc4dee0310053bfb8d613)

* Notification color & icon for DiscordRPC

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* Change foss variant application id suffix to '.foss' and more (mihonapp/mihon#1831)

- Remove `BuildConfig.PREVIEW`
- Rename `BuildConfig.INCLUDE_ANALYTICS` -> `BuildConfig.ANALYTICS_INCLUDED`
- Rename `BuildConfig.INCLUDE_UPDATER` -> `BuildConfig.UPDATER_ENABLED`
- Rename build property `with-analytics` -> `include-analytics`
- Rename build property `with-updater` -> `enable-updater`
- Add build property to disable code shrink
- Add build property to include dependency info in apk/app bundle

(cherry picked from commit 0893609ad2c4791dc404d72a5e69a2e0373517ae)

* feat(discord): update App/icon & fully works with all screens

* update Discord Rich Presence application ID and icon URLs

* Fix updateDiscordRPC for all screens (also reuse code)

* integrate Discord Rich Presence for WebViewScreen

* feat: ghibli style images for Discord RPC

* optimize code

* further optimize

* supprest useless warning

* refactor: simplify setScreen calls related to lastUsedScreen

* optimize whole file

* a

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* fix(discord): update download button URL to point to the official website

* feat(discord): allow stop Discord RPC from notification

also improve error handling

* fix(i18n): Torrent server "stop" multi-lang

* Start DiscordRPCService as foreground service on Android O+

This commit modifies the `DiscordRPCService` to start as a foreground service on Android O (API level 26) and above. This change ensures the service continues to run in the background, especially when the app is not in the foreground.

- Added a conditional check using `Build.VERSION.SDK_INT` to detect if the device is running Android O or later.
- If the device is running Android O or later, `startForegroundService` is called instead of `startService` to ensure it runs as foreground service.
- If the device is running a version prior to Android O, `startService` is called.

(cherry picked from commit 869617d8cac3aa8461158f1f9a34b9e29147e8f0)

* fix(discord): episode/chapter formating

* fix(discord): Fix & improve Discord login/accounts

* New webview with DiscordLoginScreen

* Add appbar

* Using Webview directly instead of AndroidView and add clearCookies, browsing navigation

* Using coroutine instead of thread

* Revert service

* use response block

* save preference in coroutine too

* no web navigator

* address comments for DiscordLoginScreen

* Refactor Settings screen & dialog

* Using serialization to parse JSON to avoid blocking API

* Don't clear all cookies and web storage aggressively

* Extract constant

* Fix login

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* fix(discord): Fix screen crash & token retrievement

* Update images to my liking

* spotless

* small fixes

* Update strings.xml

* Revert "Update images to my liking"

This reverts commit 4ad3b9f84fdada45ee480ae7dc242b6e1b4bc18a.

* small fixes

* hopeful fix + chapter progress

* Update ReaderActivity.kt

* Update ReaderActivity.kt

* remove timestamps

* Remove isNSFW check

because 95% of tachi extensions are rated as +18, even when there is sfw content

* Clean up

* Fix ReaderActivity

* Cleanup Settings

* Fix login

* Fix lag when getting categories

* Fix jump to pages

* Remove old SDK check

* Fix status when back from reading

* Remove pages progress

* Only set necessary action in ReaderActivity

* Using IO coroutine instead

* Add back timestamps

* Fix strings & settings

* Fix crash

* ActivityType

* Adjust description

* refactor Discord settings menu

* Using its own scope

* Optimize the connection waiting

* remove source.isNSFW

* Using screenModelScope

* Fix state access

* add modifier

* sharing OkHttpClient instance for better resource management

* Restart RPC directly via service intent instead of toggling

* remove lint suppression

* add back showProgress

* Fix set Discord status

* Fix Discord login no avatar

* Handle API rate limits and errors in getDiscordUri

* Token-based isLogged checking

* Make Discord token sensitive data and not in backup

* Minor fix

* remove debug message

---------

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
Co-authored-by: Cuong-Tran <cuongtran.tm@gmail.com>
Co-authored-by: Dark25 <nadiecaca2000@gmail.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
Co-authored-by: Jery <jery99961@gmail.com>
2025-09-04 12:40:32 +07:00
AntsyLich
73719f2f1b
Rework build variants and add FOSS variant (mihonapp/mihon#1775)
(cherry picked from commit fe22f5aa37d3613d4464e18153f183994fa45b7a)
2025-03-23 23:43:05 +07:00
Roshan Varughese
8eb2582a88
Add option to opt out of Analytics and Crashlytics (mihonapp/mihon#1237)
(cherry picked from commit 7c7af72f8cb12decc06b76c36852dcc54696236d)
2024-10-23 14:19:45 +07:00
KaiserBh
d7ed145c82
feat: add cross device sync (#1005)
* feat: add cross device sync.

* chore: add google api.

* chore: add SY specifics.

* feat: add backupSource, backupPref, and "SY" backupSavedSearches.

I forgot to add the data into the merging logic, So remote always have empty value :(. Better late than never.

* feat(sync): Allow to choose what to sync.

Various improvement and added the option to choose what they want to sync. Added sync library button to LibraryTab as well.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* oops.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* refactor: fix up the sync triggers, and update imports.

* refactor

* chore: review pointers.

* refactor: update imports

* refactor: add more error guard for gdrive.

Also changed it to be app specific, we don't want them to use sync data from SY or other forks as some of the model and backup is different. So if people using other forks they should use the same data and not mismatch.

* fix: conflict and refactor.

* refactor: update imports.

* chore: fix some of detekt error.

* refactor: add breaks and max retries.

I think we were reaching deadlock or infinite loop causing the sync to go forever.

* feat: db changes to accommodate new syncing logic.

Using timestamp to sync is a bit skewed due to system clock etc and therefore there was a lot of issues with it such as removing a manga that shouldn't have been removed. Marking chapters as unread even though it was marked as a read. Hopefully by using versioning system it should eliminate those issues.

* chore: add migrations

* chore: version and is_syncing fields.

* chore: add SY only stuff.

* fix: oops wrong index.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: review pointers.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove the option to reset timestamp

We don't need this anymore since we are utilizing versioning system.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* refactor: Forgot to use the new versioning system.

I forgot to cherry pick this from mihon branch.

* chore: remove isSyncing from Chapter/Manga model.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove unused import.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove isSyncing leftover.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove isSyncing.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* refactor: make sure the manga version is bumped.

When there is changes in the chapters table such as reading or updating last read page we should bump the manga version. This way the manga is synced properly as in the History and last_read history is synced properly. This should fix the sorting issue.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

---------

Signed-off-by: KaiserBh <kaiserbh@proton.me>
2024-03-29 12:00:26 +07:00
AntsyLich
d126f2779f
Move :core to :core:common
(cherry picked from commit aa498360db90350f2642e6320dc55e7d474df1fd)

# Conflicts:
#	app/build.gradle.kts
#	app/src/main/java/eu/kanade/domain/base/BasePreferences.kt
#	app/src/main/java/eu/kanade/domain/chapter/interactor/SetReadStatus.kt
#	app/src/main/java/eu/kanade/presentation/library/LibrarySettingsDialog.kt
#	app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt
#	app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsBrowseScreen.kt
#	app/src/main/java/eu/kanade/tachiyomi/App.kt
#	app/src/main/java/eu/kanade/tachiyomi/Migrations.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/backup/create/BackupCreator.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/MigrateDialog.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SourceSearchScreen.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcesScreenModel.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreenModel.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterDialog.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryScreenModel.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreen.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaScreenModel.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerViewerAdapter.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/stats/StatsScreenModel.kt
#	app/src/main/java/eu/kanade/tachiyomi/util/CrashLogUtil.kt
#	core/common/src/main/kotlin/eu/kanade/tachiyomi/util/storage/CbzCrypto.kt
#	data/src/main/java/tachiyomi/data/manga/MangaRepositoryImpl.kt
#	data/src/main/java/tachiyomi/data/source/SourcePagingSource.kt
#	domain/src/main/java/tachiyomi/domain/library/service/LibraryPreferences.kt
#	domain/src/main/java/tachiyomi/domain/manga/model/Manga.kt
#	settings.gradle.kts
#	source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt
#	source-local/src/androidMain/kotlin/tachiyomi/source/local/image/LocalCoverManager.kt
2024-02-19 17:54:43 +07:00
arkon
927c94041e Use UniFile for local source file handling
(cherry picked from commit ca5498434409d4085c404f4ff5ed5e608f430a3b)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt
#	core/src/main/java/tachiyomi/core/util/system/ImageUtil.kt
#	source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt
#	source-local/src/androidMain/kotlin/tachiyomi/source/local/image/LocalCoverManager.kt
#	source-local/src/commonMain/kotlin/tachiyomi/source/local/image/LocalCoverManager.kt
2023-12-23 23:22:07 -05:00
arkon
8f4ce62cc9 Use unified storage location for local source
(cherry picked from commit cf9e60fd92b3cea9ab4a48a3b8f62329df388e8d)

# Conflicts:
#	source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt
2023-12-23 22:51:41 -05:00
arkon
59c5484a15 Use unified storage location for automatic backups
(cherry picked from commit 1fbf8ca0790bcf2177e6f8850b51b9fb43c66d6e)
2023-12-23 22:44:53 -05:00
arkon
a37da0d1b7 Add unified storage location setting
Currently only using it as a replacement for the downloads location.

(cherry picked from commit 695813ef7d922bc3d9ad5bccef8a466075caa57b)
2023-12-23 22:44:44 -05:00
arkon
5d565f436f Minor cleanup
(cherry picked from commit 4a6571d310ecf2bf77e86a303f1788aaaab3df25)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/di/AppModule.kt
#	app/src/main/java/eu/kanade/tachiyomi/source/SourceExtensions.kt
#	app/src/main/java/eu/kanade/tachiyomi/source/model/SMangaExtensions.kt
2023-12-23 18:36:30 -05:00