Commit graph

46 commits

Author SHA1 Message Date
AntsyLich
d6252ab770
Address spotless lint errors (#1138)
* Add spotless (with ktlint)

* Run spotlessApply

* screaming case screaming case screaming case

* Update PagerViewerAdapter.kt

* Update ReaderTransitionView.kt
2024-08-19 18:11:39 +06:00
FooIbar
0ce1cf22cd
Fix unexpected skips in strong skipping mode (#940) 2024-06-23 03:53:49 +06:00
renovate[bot]
46003ec251
chore(deps): update kotlin and compose compiler to v2 (major) (#819)
* chore(deps): update kotlin and compose compiler to v2

* Update .gitignore

* Fix build

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2024-06-07 03:48:35 +06:00
AntsyLich
e448e40406
Rework buildSrc and remove usage of subprojects 2024-04-06 12:18:10 +06:00
AntsyLich
aa498360db
Move :core to :core:common 2024-01-29 15:20:21 +06:00
Theodoro Loureiro mota
e17d87f357
Adding Type-safe project accessors (#194)
* replace the windowInsetsPadding for navigationBarsPadding + statusBarsPadding

* Enabling TYPESAFE_PROJECT_ACCESSORS

* Adding typesafe project accessors in the app module

* Adding typesafe project accessors in the core module

* Adding typesafe project accessors in the core-metadata module

* Adding typesafe project accessors in the data module

* Adding typesafe project accessors in the domain module

* Adding typesafe project accessors in the presentation-core module

* Adding typesafe project accessors in the presentation-widget module

* Adding typesafe project accessors in the source-local module

* Adding typesafe project accessors in the source-api module

* Rolling back

* Changing TYPESAFE_PROJECT_ACCESSORS line

* Removing extra spaces
2024-01-23 18:35:58 +06:00
arkon
8b65fd5751 Minor exception message cleanup 2023-12-28 16:33:54 -05:00
arkon
2d7650537d Address some build warnings 2023-12-25 16:31:40 -05:00
arkon
44d6c4fe44 Minor cleanup/docs 2023-12-10 10:10:27 -05:00
arkon
00afee83b8 Suppress build warnings from MPP modules 2023-11-19 10:54:19 -05:00
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
7326598475 Minor cleanup to ResolvableSource 2023-10-21 21:50:53 -04:00
Joshua Owolabi
f84868a264
Allow extensions to open manga or chapter by URL (#9996)
* open manga and chapter using URL

* removing unnnecessary logs

* Resolving comments

* Resolving comments
2023-10-21 21:44:43 -04:00
arkon
0f42b9f154 Add source preferences to backups
Closes #1857

Co-authored-by: jmir1 <jmir1@users.noreply.github.com>
2023-10-08 16:02:03 -04:00
arkon
afb1ee2200 Rename new method in ConfigurableSource to get preferences
Maybe fixes #9969
2023-09-30 14:36:06 -04:00
arkon
2dd2db7225 Update to Kotlin 1.9.10 2023-09-09 14:49:04 -04:00
arkon
26c5d761da Add more replacement suspend functions for source APIs
These are basically 1-to-1 replacements for the existing RxJava APIs.
This will make the initial migration off of RxJava simpler. We'll
revisit the actual call flows in followup versions of the API.
2023-09-08 22:58:46 -04:00
arkon
3f0db60a99 Minor updates 2023-09-03 10:02:04 -04:00
arkon
d29b7c4e57 Switch to different ktlint plugin
Should be better at incremental builds.
To format, run `./gradlew ktlintFormat`.
2023-09-01 23:02:18 -04:00
arkon
13dc54df70 Remove unused rxandroid dependency 2023-08-26 10:30:26 -04:00
arkon
6d9a8a30e9 Add ResolvableSource interface for potentially opening entries directly based on some URI via a share intent
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.
2023-08-25 22:25:00 -04:00
Alessandro Jean
3411ac40c0
Make source ID generation function reusable to extensions (#9836)
* Make source ID generation function reusable to extensions.

* Add parameters and return documentation.
2023-08-11 22:29:56 -04:00
Mekanik
8f395d98e7
Make some error messages localizable (#9811)
* Make error message of 3 exceptions localizable.

* Revert unnecessary file handle exception change.
2023-08-06 09:50:43 -04:00
arkon
6a558ad119 Upgrade to SQLDelight 2 2023-07-29 15:32:09 -04:00
Ivan Iskandar
8df9bce1b4
Upgrade Kotlin 1.8.21 (#9495) 2023-05-13 12:05:19 -04:00
arkon
94c94b2d88 Minor JavaDoc updates 2023-04-22 11:15:45 -04:00
Andreas
1abf01c4a0
Convert source modules to Kotlin Multiplatform (#9172)
Use KMP in source modules 


Use KMP in source-api


Expect LocalSource
2023-03-05 10:16:19 -05:00
arkon
93523ef50b Remove dependency injection from core module and data module from presentation-widget module
Includes side effects:
- No longer need to restart app for user agent string change to take effect
- parseAs extension function requires a Json instance in the calling context, which doesn't necessarily need to be the default one provided by Injekt
2023-02-20 19:02:38 -05:00
arkon
e3cf863230 Start moving some Compose components to presentation-core module 2023-02-18 15:52:52 -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
b4b3a4d286
Fixup HttpPageLoader _loadPage (#8984)
Fixup for e4bc8990 (#8955)

HttpSource.fetchImage() uses Call.asObservableSuccess(), which
cancels the call on unsubscribe. This causes the call to be cancelled
before it is used, leading to a "java.net.SocketException: Socket is
closed" when trying to use the response in putImageToCache().

To fix this, use Call.awaitSuccess() via a new HttpSource.getImage()
suspending function. This addition to source-api is only intended for
app use, so it will not be added to the extensions-api stubs.
2023-01-25 18:18:12 -05:00
Two-Ai
2ef1f07aae
Replace PageLoader.getPage() with PageLoader.loadPage() (#8976)
* Follow page status via StateFlow

Keep getPage subscription since it's needed to load the pages

* Replace PageLoader.getPage with PageLoader.loadPage
2023-01-23 17:10:44 -05:00
Andreas
2b5d9fd76b
Move shared configuration to subprojects in root Gradle file (#8951)
* Move shared configuration to subprojects in root Gradle file

* Missed but not forgotten

* Review changes
2023-01-20 23:04:22 -05:00
Andreas
c31e75f02f
Create plugin for linting (#8942) 2023-01-18 22:33:56 -05:00
Two-Ai
593172f891
Track Page progress with StateFlow (#8749)
* Update ReaderProgressIndicator documentation

ReaderProgressIndicator is not always determinate (cc554530, #5605).

* Track Page progress with StateFlow
2022-12-16 22:18:50 -05:00
Two-Ai
6ca32710be
Cleanup Page status (#8696)
* Cleanup Page statusSubject and statusCallback

* Convert Page status from Int to enum
2022-12-07 18:28:38 -05:00
stevenyomi
b006fe3a22
Revert "Tweak how getChapterUrl works (#8392)" (#8427)
This reverts commit 1a25cea0d6.
2022-11-03 09:23:59 -04:00
AntsyLich
1a25cea0d6
Tweak how getChapterUrl works (#8392) 2022-10-31 13:05:27 -04:00
arkon
26a42ba9c0 Upgrade to Kotlin 1.7.20
Also run formatter and address some deprecation warnings.
2022-10-11 22:40:08 -04:00
AntsyLich
de23226591
Add methods to get manga and chapter url (#8114)
* Add methods to get manga and chapter url

Some fork supports directly opening chapters with webview hence `getChapterUrl`

* Review Changes

* Add since to javadoc
2022-10-01 11:31:07 -04:00
stevenyomi
f4c684b4b8
Remove cache control on already cacheless image request (#8085) 2022-09-26 17:13:03 -04:00
Alessandro Jean
ba533f30ce
Add support to update strategy on global update (#7902)
* Add support to update strategy.

* Add JavaDoc and bump the LIB_VERSION_MAX constant.

* Fix a word typo.

* Store update strategy enum as integer in the DB.
2022-09-25 10:12:36 -04:00
Ivan Iskandar
747cbd24cb
Adjust source-api R8 rules (#8064) 2022-09-24 10:13:58 -04:00
Ivan Iskandar
4a3070265a
Upgrade AGP 7.3.0 (#8016) 2022-09-17 10:26:02 -04:00
Andreas
86fe850794
Extract source api from app module (#8014)
* Extract source api from app module

* Extract source online api from app module
2022-09-15 18:12:27 -04:00