Commit Graph

130 Commits

Author SHA1 Message Date
arkon 46e734fc8e Migrate to multiplatform string resources (#10147)
* Migrate to multiplatform string resources

* Move plurals translations into separate files

* Fix lint check on generated files
2023-11-18 13:54:56 -05:00
arkon 2c032ff70d Address more Compose lint warnings 2023-11-17 09:46:13 -05:00
arkon 6eb5a25ea1 Bump dependencies 2023-11-15 22:30:10 -05:00
arkon d7d7a6d2fc Revert Compose update
Fixes #10069
2023-10-26 13:06:26 -04:00
arkon 012854dd1e Update Voyager 2023-10-22 15:54:31 -04:00
arkon 8e4cedf173 Update Compose 2023-10-21 18:09:30 -04:00
Joshua 3d0e750519 [Download Queue] Move series to bottom (#9918)
Added item in download queue page to move series to bottom
2023-09-09 14:01:24 -04:00
arkon 1668be8587 Remove old FastScroller
Not sure if this will return to the download queue screen, you really
shouldn't be downloading a ton of stuff at once anyway?
2023-09-08 22:30:13 -04:00
arkon 5ca7c39751 Replace Cascade with our own somewhat janky implementation 2023-05-21 11:02:56 -04:00
Ivan Iskandar 6263a52777 Fix navigation backstack (#9497)
Partial revert of dbbf6c5de0
2023-05-13 14:22:02 -04:00
arkon dbbf6c5de0 Switch back to upstream version of Voyager 2023-05-12 18:01:48 -04:00
Two-Ai b41565f879 Inline DownloadQueue into Downloader (#9159)
* Move statusFlow and progressFlow to DownloadManager

* Inline DownloadQueue into Downloader

* Move reorderQueue implementation to Downloader
2023-02-28 22:13:13 -05:00
Two-Ai 86b9262a7e Make DownloadManager the sole entry point for DownloadService (#9140)
* Rename functions for DownloadService internal use

* Call DownloadService.start via DownloadManager

* Inline DownloadService.stop into pauseDownloads

* Inline DownloadService.stop into clearQueue

NotificationReceiver will now also stop the DownloadService when
receiving ACTION_CLEAR_DOWNLOADS.

* Provide DownloadService.isRunning via DownloadManager
2023-02-24 22:07:30 -05:00
arkon 10d7349506 Move more components to presentation-core module 2023-02-20 10:12:41 -05:00
arkon 3f7911235c Use unique keys for all screens to avoid crashes
Fixes #9008
Fixes #9110
2023-02-19 11:09:41 -05:00
arkon e3cf863230 Start moving some Compose components to presentation-core module 2023-02-18 15:52:52 -05:00
Ivan Iskandar ad762f8303 Remove FAB extra padding in DownloadQueueScreen (#9053) 2023-02-08 09:37:04 -05:00
Two-Ai bd2cb97179 Replace RxJava in DownloadQueue (#9016)
* Misc cleanup

- Replace !List.isEmpty with List.isNotEmpty
- Remove redundant case in MoreScreenModel
- Drop no-op StateFlow.catch
  - From lint warning:
> SharedFlow never completes, so this operator typically has not
> effect, it can only catch exceptions from 'onSubscribe' operator

* Convert DownloadQueue queue to MutableStateFlow

Replace delegation to a MutableList with an internal
MutableStateFlow<List>.

In order to avoid modifying every usage of the queue as a list, add
passthrough functions for the currently used list functions. This
should be later refactored, possibly by inlining DownloadQueue
into Downloader.

DownloadQueue.updates was a SharedFlow which updated every time a
change was made to the queue. This is now equivalent to the queue
StateFlow.

Simultaneous assignments to _state.value could cause concurrency
issues. To avoid this, always modify the queue using _state.update.

* Add Download.statusFlow/progressFlow

progressFlow is based on the DownloadQueueScreenModel implementation
rather than the DownloadQueue implementation.

* Reimplement DownloadQueue.statusFlow/progressFlow

Use StateFlow<List<T>>.flatMapLatest() and List<Flow<T>>.merge() to
replicate the effect of PublishSubject.

Use drop(1) to avoid re-emitting the state of each download each time
the merged flow is recreated.

* fixup! Reimplement DownloadQueue.statusFlow/progressFlow
2023-02-07 22:13:19 -05:00
arkon 1730dd6af1 Move more things around 2023-01-27 22:31:12 -05:00
Two-Ai 2245658363 Replace RxJava in DownloadQueueScreenModel (#8872) 2023-01-09 23:08:04 -05:00
Two-Ai 5f6666a438 Migrate Download to domain model (#8664) 2022-12-03 22:30:30 -05:00
Ivan Iskandar 3d66eaea83 Merge Voyager screens (#8656)
* Merge Voyager screens

* cleanups
2022-12-02 22:35:30 -05:00
Ivan Iskandar cd13e187cf Use Voyager on Downloads screen (#8640) 2022-11-28 09:23:11 -05:00
arkon 3480b45098 Minor cleanup 2022-11-27 17:12:45 -05:00
arkon 37118088d4 Remove usage of PublishRelay in DownloadQueue 2022-11-26 10:07:51 -05:00
AntsyLich ba2a528886 Fix related to cancelling queued chapters (#8528)
Tachi removes the downloaded chapter (if it exists) when you just cancelled a download from queue.

PR fixes that

Also removes redundant return
2022-11-18 22:27:39 -05:00
arkon 10e349f76e Retain previous selected state when updating list states
Fixes #8417
2022-11-13 22:35:52 -05:00
arkon 811931ccc0 Minor cleanup 2022-11-10 22:23:34 -05:00
arkon df773ee15c Refactor overflow menus into a composable 2022-10-30 11:06:41 -04:00
arkon 0849111247 Use remember var delegates in more places 2022-10-29 16:14:49 -04:00
stevenyomi 4b60138d41 Clean up strings and icons (#8326)
* Clean up strings and icons

* fix incorrect usages of label_more

* restore strings and reduce usage of android.R

* removing icon desc of FABs anyway as app's not for visual impaired users
2022-10-29 11:43:51 -04:00
arkon 152eb5b951 Handle async cache in updates and manga screens
- Also fix concurrent accesses to main cache map
- Also debounce sources and updates list updates to maybe avoid crashing due to dupe LazyColumn keys
2022-10-22 10:50:44 -04:00
arkon b04807e53a Proper DI instantiation for some more download related classes 2022-10-21 14:29:44 -04:00
stevenyomi 824d5e22bc Clean up strings and resources (#8253)
* Clean up strings and resources

* fix pringle's typo

* restore catching file pick errors

* add back file chooser title

* revert #7740 and remove try-catch of chooser-wrapped intent

* swap xmlns lines

* swap xml tools lines
2022-10-20 17:48:13 -04:00
Ivan Iskandar 8500add09f EmptyScreen: Compose-ify and apply content padding (#8177)
* Apply content padding to empty screen

except the empty screens in browse

* compose-ify EmptyScreen

* center face when action show

* fix padding

* apply content padding to browse tabs

* fix duplicate bottom insets
2022-10-09 15:52:56 -04:00
arkon 3bfbd58402 Clean up download state logic in MorePresenter 2022-10-09 10:37:44 -04:00
Ivan Iskandar f98b4f4e39 DownloadController: Fix first active download status not updating (#8069) 2022-09-24 11:59:11 -04:00
arkon 83871fc013 Minor cleanup/fixes
- Add FAB collapsing in clear database screen (fixes #7935)
- Don't allow multiline category names to be entered
- Consolidate Downloaded Only / Incognito Mode banner components
- Fix see-through migrate screen sticky header
2022-09-18 16:08:58 -04:00
Andreas 0215b66098 Count the downloads under each header instead of count the number of headers (#7990) 2022-09-11 13:11:50 -04:00
Ivan Iskandar fb9791f597 DownloadController: Partial Compose conversion (#7969)
Item list is not changed as currently there is no fitting Compose component to
replace the drag-drop behavior.
2022-09-09 22:29:40 -04:00
arkon 7e4c45858f Bump dependencies 2022-06-29 22:45:22 -04:00
CVIUS b26daf8824 Fix "Move to top" showing at the most top item in download queue (#7109) 2022-05-11 22:35:30 -04:00
arkon c1976ef599 Avoid some crashes 2022-04-14 18:28:16 -04:00
arkon 5afff31f72 Formatting 2022-04-08 16:44:23 -04:00
arkon f0eb42e72d Update linter 2022-04-08 15:30:39 -04:00
Franco Olivera 3aa4e6eb93 Add "Move all chapters from series to top" option to download context menu (#6794)
* Added basic move to top series feature

* Remove intermediate List

* Change text string

* Remove spanish manual translation

* Changed algorithm to use "partition"
2022-03-26 14:49:37 -04:00
arkon 353485054e Fix some crashes 2021-12-28 16:53:35 -05:00
Ivan Iskandar 9106fc5b94 Grouped chapter download list by source (#5575) 2021-10-09 11:41:45 -04:00
Platiplus e98f90b099 [6059] - Pending downloads count on Download queue screen (#6064)
* Updating the download queue label to account for pending downloads even on paused state

* changing separator

* Created observer to update the TitleBar of the controller to reflect pending downloads

* Reverting changes from MoreController that were made in an another commit

* Refactoring updateTitle method
2021-10-07 22:13:35 -04:00
Ivan Iskandar 2e127dff1f Replace Timber with Square Logcat and make logging configurable (#6062)
* Replace Timber with Square Logcat

* Configurable logger
2021-10-07 22:12:55 -04:00