* 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>
* Add dependency com.journeyapps:zxing-android-embedded:4.3.0
* Add widget parameter to EditTextPreferenceWidget
* Add QR code scanner icon button to sync API key preference which launches a ScanContract
* Remove screenOrientation property from CaptureActivity manifest
* Allow scanning both normal and inverted codes
* store values and make code more concise
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
* Import local context
---------
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
(cherry picked from commit 84c7da5a7d244ffc0cd7155d15e0a200f548ad35)
* fix(storage): setting app's data folder on Android TV
Also check if set location is actually accessible then update UI compose accordingly (for all devices) in some cases (e.g. location set but actual folder was deleted or permission revoked)
(cherry picked from commit ef56b7f11ef0d243ef14816e85afa360f1137fe8)
* chore(storage): improve permission handling for older Android version & Fire TV
(cherry picked from commit 5ee009a6db73d33687e55ee8f4ad6412a9e320d4)
* migrating
* - Fix Broadcaster
- Include Updater for Debug
- json to emulate Github call
* - resetup AppUpdateJob when changing settings
- Fix ACTION_MY_PACKAGE_REPLACED
* improve notification
* update icon
* app update to high important
* - Run auto install on AppUpdateJob
- Add release link to job
* idle state & network aware
* fix duplicated job start
* don't show notification & start job for peek-into-preview
* allow cancel auto update job when set to NEVER
* always notify on install complete
* rearm AppUpdateJob each time MainActivity already checked for update
* MainActivity checks every 2 days, rearm AutoUpdateJob in 3 days
* - fix install error notification ID
- add timeout for manual installation if package manager crash
* settings & spotless
* restriction settings & auto run download-install if not in restrictions
* clean up
* 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>
Mainly for migration process and to avoid breakage on users who doesn't
change their granular storage prefs.
(cherry picked from commit e5a22eafe72b701ed277d937a5c0f25d84a5eb25)
Requires adjusting some file reading to first copy to a temporary file
in cache that we have permissions to read from. This is only applicable for things
like ZIP files where we need an actual File rather than just some Android content
URI shenanigans.
(cherry picked from commit 4fcdde4913df28bbd678ae1be4a2971ed77179d3)
# 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
# source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt
Implemented as an intermediate step in the existing Global Search share intent workflow.
If any source manages to resolve the URI (e.g., a URL, a slug, etc.), the resolved SManga entry
is directly opened. If nothing gets resolved, continue to a Global Search.
(cherry picked from commit 6d9a8a30e974574b8d92ba478333e6f62b0de2e2)
No more trampolining, and stuff.
It's pretty much straight copy-paste from the service, with
some changes related to cancellation handling. Manual updates
will also runs with workman job so auto update work
scheduling need some adjustments too.
Bumped version code to re-enqueue auto update job with the
new spec.
Co-authored-by: arkon <arkon@users.noreply.github.com>
(cherry picked from commit ef9dacde79b1803ec117aae4ea948194b6394605)
# Conflicts:
# app/build.gradle.kts
# app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt
# app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt
Move Widget to seperate module
- Create a core module for presentation. Widget and App will share some resources and hopefully composables
(cherry picked from commit 12e41b6e6f3b5d95d19e1caa6c9fbe5eb6c9749c)
Some devices are throwing a SecurityException (calling getApplicationLocales) for some reason.
(cherry picked from commit 7e74949d38a8ea43120e672c61556419157a4af1)
* Add Crash activity
When the application crashes this sends them to a different activity with the cause message and an option to dump the crash logs
* Review changes
(cherry picked from commit 4178f945c9b6bcae9323c02534d7e620136a4e76)
# Conflicts:
# app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt
* Setup Baseline Profile
Adds Baseline Profile generator and startup time test.
Readme included in macrobenchmark module to run the generator.
* changes
(cherry picked from commit 3b623964421b6bc196bcf751f920975c47884326)
# Conflicts:
# app/build.gradle.kts
# gradle/androidx.versions.toml
Also add POST_NOTIFICATIONS permissions to make Android Studio stop complaining about it.
(cherry picked from commit b37b3767f3c55a74bede78d11300249ab419a4c7)
Also add required config for android 13 system picker
(cherry picked from commit 2d690a09b37a55e87ce4365102ee818c5d9d1ba0)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
Seems to be more trouble than it's worth since it makes the app uninstallable without manually deleting app data. Users have to go out of their way to save data into the app data folder now anyway.
(cherry picked from commit 83a04da4a0819c74a8aeec265976067ecaab53c3)
* Use existing worker for manual backup creation
This will show the "creating backup" notification when auto backup is
running. Complete or error notification will continue to be shown only on
manual job.
* Make sure disabling auto backup don't cancel running manual backup job
(cherry picked from commit d53bb4c337da6df807b43295d2991e8af9015098)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/backup/AbstractBackupManager.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreateService.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt
So I stop confusing it for updaters of other things.
(cherry picked from commit 21e647017b629d1ec07a32b548d27342810a2c6b)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/Migrations.kt
* Implement new extension install methods
* Fixes
* Resolve feedback
* Keep pending status when waiting to install
* Cancellable installation
* Remove auto error now that we have cancellable job
(cherry picked from commit b284384f0ad318fea24e7324a4621e12eb9aca7f)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt
# app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionHolder.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt