* Remove detekt (mihonapp/mihon#1130)
Annoying. More annoying in this project.
(cherry picked from commit 777ae2461e1eb277a3aa0c998ff69e4f100387a1)
* Add spotless (with ktlint) (mihonapp/mihon#1136)
(cherry picked from commit 5ae8095ef1ed2ae9f98486f9148e933c77a28692)
* Address spotless lint errors (mihonapp/mihon#1138)
* Add spotless (with ktlint)
* Run spotlessApply
* screaming case screaming case screaming case
* Update PagerViewerAdapter.kt
* Update ReaderTransitionView.kt
(cherry picked from commit d6252ab7703d52ecf9f43de3ee36fd63e665a31f)
* Generate locales_config.xml in build dir
(cherry picked from commit ac41bffdc97b4cfed923de6b9e8e01cccf3eb6eb)
* Address more spotless lint errors in SY
* some more missed
* more missed
* still missing, not sure while it won't report error when running locally
* one more
* more
* more
* correct comment
---------
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
* Add support for localdate based relative times
* Update History Screen to use new localdate based relative times
* Update Updates Screen to use new localdate based relative times
* Cleaned up date util classes
* Updated build time display
* Code cleanup
* Fixed crash in settings
* Updated Preferences item
* Worker Info works
* Fixed Tracker date display
* Code changes to pass detekt
(cherry picked from commit 7ff95e21babda98dd1b479912278d6029cd15f0d)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/history/HistoryScreenModel.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/updates/UpdatesScreenModel.kt
# app/src/main/java/eu/kanade/tachiyomi/util/lang/DateExtensions.kt
* Add custom thumbnail url. Support backup & restore
- add custom thumbnail url in edit info/custom
- include it in backup n restore
* increase chop char
* edit chop char again to match screenshoot
* tweak truncating middle part
* apply edited cover to history, updates , others
* simplify placeholder logic
---------
Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
* 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
(cherry picked from commit e17d87f35749715946a96dc0e654792227c6722d)
* open manga and chapter using URL
* removing unnnecessary logs
* Resolving comments
* Resolving comments
(cherry picked from commit f84868a2641578b7e07719d8f580e4668804fd50)
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.
(cherry picked from commit 26c5d761da4ba577481f41e63f03952b8a6c323f)
# Conflicts:
# data/src/main/java/tachiyomi/data/source/SourcePagingSource.kt
# source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSource.kt
# source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/online/HttpSourceFetcher.kt
Should be better at incremental builds.
To format, run `./gradlew ktlintFormat`.
(cherry picked from commit d29b7c4e5735dc137d578d3bcb3da1f0a02573e8)
# Conflicts:
# buildSrc/src/main/kotlin/tachiyomi.lint.gradle.kts
# data/src/main/java/tachiyomi/data/manga/MangaMapper.kt
# domain/src/main/java/tachiyomi/domain/library/model/LibrarySortMode.kt
# domain/src/main/java/tachiyomi/domain/library/service/LibraryPreferences.kt
# domain/src/main/java/tachiyomi/domain/release/interactor/GetApplicationRelease.kt
# presentation-core/src/main/java/tachiyomi/presentation/core/components/CollapsibleBox.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)
* Make source ID generation function reusable to extensions.
* Add parameters and return documentation.
(cherry picked from commit 3411ac40c014c0b95a105b00f87432e0ea77ff14)
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
(cherry picked from commit 93523ef50b80ef294866bfb0da54e236cdf2d9f6)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateChecker.kt
# app/src/main/java/eu/kanade/tachiyomi/extension/api/ExtensionGithubApi.kt
# core/src/main/java/eu/kanade/tachiyomi/network/NetworkHelper.kt
# core/src/main/java/eu/kanade/tachiyomi/network/OkHttpExtensions.kt
# domain/build.gradle.kts
# source-api/build.gradle.kts
* 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
(cherry picked from commit bd2cb97179de60dded147f1ec9cdb55f70f28e74)
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.
(cherry picked from commit b4b3a4d2869fae7839b4b3111e289056e33cfea8)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt
* Follow page status via StateFlow
Keep getPage subscription since it's needed to load the pages
* Replace PageLoader.getPage with PageLoader.loadPage
(cherry picked from commit 2ef1f07aaea0852c13a4eb4096ac96c8aa507c39)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt