Commit Graph

4473 Commits

Author SHA1 Message Date
arkon 9766399539 Don't update trackers after reading a chapter if Incognito Mode is enabled
Closes #7228
2023-06-13 18:51:07 -04:00
Simon dddba7bb6f Filter out non-downloaded chapters in reader when Downloaded Only is enabled (#9568)
* FIxed Issue #5463 - DownloadedOnly Bug

* Changes according to Feedback

* Changes according to Feedback

---------

Co-authored-by: AlphiGhost <71730726+AlphiGhost@users.noreply.github.com>
2023-06-10 12:48:15 -04:00
Two-Ai cf777d9893 Cleanup MangaScreenModel successState usage (#9582)
* Refactor updateSuccessState

- Convert to inline function
- Use when for type safety if we add other MangaScreenState types

* Replace equivalent expressions with updateSuccessState

* Replace safe cast in MangaScreen
2023-06-09 23:11:02 -04:00
arkon 841f80f935 Add share menu item in reader
Closes #9510
2023-06-09 22:52:49 -04:00
arkon 34b9c82cd0 Remove General settings section 2023-06-04 17:07:29 -04:00
arkon 405a75438a Remove per-category display mode
There seems to be little value in this feature, and juggling flag masks is annoying.
Per-category sorting is still a thing, but could be refactored away from the flag in the feature.
2023-06-04 16:59:21 -04:00
Ivan Iskandar 39e4568460 ReaderProgressIndicator: Convert to Compose (#9574) 2023-06-03 13:11:41 -04:00
arkon 1a1f16f44a Bump dependencies 2023-05-31 22:48:13 -04:00
arkon 431f8772f8 Address minor build warnings 2023-05-31 22:47:31 -04:00
arkon 8f4bc71cf7 Remove confirm exit option
Redundant with predictive back, but also just sort of pointless since it doesn't help
with any sort of app state retention.
2023-05-31 18:51:01 -04:00
Two-Ai 0ac38297f4 Replace RxJava in extension installer (#9556)
* Replace RxJava in extension installer

Replace common downloadsRelay with Map of individual StateFlows

* Drop RxRelay dependency

* Simplify updateAllExtensions

* Simplify addDownloadState/removeDownloadState

Use immutable Map functions instead of converting to MutableMap
2023-05-30 10:25:20 -04:00
Ivan Iskandar a458bd9fdb Update Glance v1.0.0-beta01 (#9551) 2023-05-27 22:59:21 -04:00
arkon ed5a56be60 Set reader chapter name to marquee if too long
Closes #7159
2023-05-27 19:15:11 -04:00
arkon 8735f3566f Fix bookmarked chapters being deleted after manually marked as read
Fixes #9520
2023-05-27 18:30:59 -04:00
arkon 46efd4c134 Fix some crashes 2023-05-27 09:53:01 -04:00
arkon dfd38db7e3 Use primitive state holders 2023-05-27 09:22:31 -04:00
arkon e3b2720924 Remove redundant inset handling in AdaptiveSheet
The Dialog is handling it anyway, so this doesn't really do anything useful.
We might need to add this back if Dialog actually handles edge-to-edge properly.
2023-05-24 18:10:17 -04:00
Two-Ai 3ae1e37c40 Replace RxJava in Downloader (#9256)
* Rename removeFromQueueByPredicate to removeFromQueueIf

Follow-up to PR comment in #9511

* Make Download hashCode stable

Mutating pages would previously change the Download hashCode, which
breaks HashMap lookups.

* Convert Donwloader subscription to coroutine

Replace downloadsRelay with activeDownloadsFlow. Instead of managing
a PublishRelay independent from the queue, derive a Flow of active
downloads directly from the queue StateFlow. (This will allow
updating the queue without pausing the downloader, to be done in a
follow-up PR.)

When a download completes successfully, the downloads is removed from
queueState. This updates activeDownloadsFlow and causes the
downloaderJob start the download job for the next active download.

When a download fails, the download is left in the queue, so
queueState is not modified. To make activeDownloadsFlow update
without a change to queueState, use transformLatest and use the
Download statusFlows to suspend until a download reaches the ERROR
state.

To avoid stopping and starting downloads every time
activeDownloadsFlow emits a new value, maintain a map of current
download Jobs and only start/stop jobs in the difference between
downloadJobs and activeDownloads. To make sure all child download
jobs are cancelled when the top-level downloader job is cancelled,
use supervisorScope.

* Remove obsolete main thread references in Downloader

Thread safety of the queue state used to be guaranteed by running all
queue mutation on the main thread, but this has not been true for
some time. Since the queue state is now backed by a StateFlow,
queueState can be safely updated by any thread.
2023-05-24 18:02:27 -04:00
arkon 5a9889b562 Upgrade Compose
Co-authored-by: ivaniskandar <ivaniskandar@users.noreply.github.com>
2023-05-21 11:21:32 -04:00
arkon 5ca7c39751 Replace Cascade with our own somewhat janky implementation 2023-05-21 11:02:56 -04:00
arkon a4d86a2e1e Enable predictive back gesture for Android 13 (behind developer option)/14+ 2023-05-20 16:16:19 -04:00
Ivan Iskandar 73118d4af7 DownloadCache: Fix freezing on initial loading of cache file (#9523) 2023-05-19 22:06:06 -04:00
Two-Ai c27bf4e866 Minor Downloader cleanup (#9511)
* Inline completeDownload

* Consolidate queueState updates in removeFromQueue

* Inline post-download steps into downloadChapter
2023-05-19 17:16:32 -04:00
arkon fb38d30775 Avoid attempts to renaming download dirs if name hasn't actually changed
Maybe fixes #9503
2023-05-14 12:24:40 -04:00
Ivan Iskandar 6263a52777 Fix navigation backstack (#9497)
Partial revert of dbbf6c5de0
2023-05-13 14:22:02 -04:00
arkon 8fae92034e Fix missing appbar when statistics are loading 2023-05-12 18:13:07 -04:00
AntsyLich f70d5ea976 Delay automatic backup when restoring (#9492) 2023-05-12 18:02:11 -04:00
arkon dbbf6c5de0 Switch back to upstream version of Voyager 2023-05-12 18:01:48 -04:00
arkon 6f59c6c6bb Revert attempts to read archives to cache first
Issues:
- Apache implementation relies on methods unavailable on lower Android API levels
- Using input stream implementation doesn't seem to read some files properly, but using
  ZipFile implementation still requires reading the entire thing into memory
2023-05-07 12:03:58 -04:00
Ivan Iskandar d36cf5ce15 Chapter transition tweaks (#9470)
* Chapter transition tweaks

* Chapter transition cleanups
2023-05-07 10:08:33 -04:00
arkon b051e37ab7 Address minor build warnings 2023-05-06 23:11:14 -04:00
arkon 1b25290d39 Fix filter FAB not working in migrate screen
I feel like this needs to be aligned with the browse screen/deduped somehow, but that can happen separately.

Fixes #9444
2023-05-06 12:27:44 -04:00
Two-Ai bbe0ab1dd0 Fix delay between URL fetch and image download (#9452)
Fetch each source image URL immediately before downloading each image
instead of fetching all URLs and then downloading all images.

Source image URLs may change, so the downloader may fail if there is
too long a delay between fetching the image URL and downloading the
image.
2023-05-05 22:17:51 -04:00
Two-Ai cb2d43c0d1 Ensure final download status is always set (#9453) 2023-05-05 22:17:05 -04:00
arkon 9a10656bf0 Migrate reader slider and next/prev buttons to Compose 2023-05-03 17:14:11 -04:00
arkon 3c79777e66 Migrate PageIndicatorTextView to Compose
Probably closes #7798
2023-05-03 16:18:25 -04:00
arkon f5ad95d78a Fix language in source filter list jumping to top incorrectly
Fixes #9068
2023-05-03 15:07:41 -04:00
arkon 14c465d36f Get current track services when composing LibrarySettingsDialog
Fixes #9431
2023-05-03 14:41:08 -04:00
arkon c623258e8c Try Apache implementation of ZipFile instead
Docs: https://commons.apache.org/proper/commons-compress/
Related StackOverflow post: https://stackoverflow.com/a/54236244/4421500

Related to #9438
2023-05-03 14:00:33 -04:00
Houssein Zaghdane 6ce42dc167 fix to multiple "add to library" toasts bug when adding a new series (#9433)
fix to multiple "add to library" toasts bug (#9177)

Co-authored-by: Houssein Zaghdane <zaghdane@fireflow.de>
2023-05-03 10:40:11 -04:00
Andreas f63573f25f Remove SourceData and use StubSource directly for database (#9429) 2023-05-03 10:33:05 -04:00
Andreas 02864ebd60 Move GitHub Release/App Update logic to data (#9422)
* Move GitHub Release/App Update logic to data

* Add tests for GetApplicationRelease

* Review changes
2023-04-29 22:14:49 -04:00
arkon 9339ea4196 Process chapter duplicates after sorting
Closes #9255, sort of. The example is a bad edge case though, where chapter numbers are repeated across versions,
so realistically only the first 113 will appear but the later 113(s) won't despite being "different". Those realistically
should be in different manga entries, not all mixed together, so this is just a crappy source.
2023-04-28 16:01:14 -04:00
AntsyLich 6bdc1b676e Avoid potential crash when opening library settings sheet 2.0 (#9419)
Avoid potential crash when opening library settings sheet  2.0

Previous one had issues
2023-04-28 15:15:54 -04:00
arkon ccd4143d9d extension-lib 1.5: Add AppInfo#getSupportedImageMimeTypes() 2023-04-28 11:36:17 -04:00
arkon c590f55030 Revert "Avoid potential crash when opening library settings sheet (#9415)"
This reverts commit 2cb08e6bb1.
2023-04-28 10:11:13 -04:00
AntsyLich 2cb08e6bb1 Avoid potential crash when opening library settings sheet (#9415) 2023-04-28 09:08:17 -04:00
arkon c9805b8612 Consolidate exception message formatting
Closes #9408
2023-04-27 22:45:30 -04:00
Quang Kieu 41c89eb61d Add interval data layer (#9398)
* Update Manga classes for fetch interval data

* Update per review

bump version

---------

Co-authored-by: quangkieu <qkieu>
2023-04-27 22:27:12 -04:00
arkon 20bec66a9d Handle archives with nested directories properly
Closes #9389
2023-04-25 22:07:34 -04:00