Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 95148a1071 | |||
| b07fcf5842 | |||
| f669a1ca0f | |||
| 5a921ea862 | |||
| 810efde0b0 | |||
| 03510a1f19 | |||
| 049f32d2f0 | |||
| 11a9db3cc2 | |||
| 57dd5743f0 |
1
.gitignore
vendored
@@ -4,6 +4,7 @@
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/misc.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
|
||||
2
.idea/misc.xml
generated
@@ -29,7 +29,7 @@
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
18
README.md
@@ -15,20 +15,20 @@ Legacy build (Android 4.1+): [available here](https://github.com/nv95/Kotatsu/re
|
||||
* Online manga catalogues
|
||||
* Search manga by name and genre
|
||||
* Reading history
|
||||
* Favourites with custom categories
|
||||
* Saving manga and reading it offline
|
||||
* Tablet-optimized modern UI
|
||||
* Reading third-party comics from CBZ
|
||||
* Favourites organized by user-defined categories
|
||||
* Downloading manga and reading it offline. Third-party CBZ archives also supported
|
||||
* Tablet-optimized material design UI
|
||||
* Standard and Webtoon-optimized reader
|
||||
* Notifications about new chapters
|
||||
* Updates feed
|
||||
* Global search
|
||||
* Notifications about new chapters with updates feed
|
||||
|
||||
### Screenshots
|
||||
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|---|---|---|
|
||||
|  |  |  |
|
||||
|  |  |  |
|
||||
|
||||
|  |  |
|
||||
|---|---|
|
||||
|
||||
### License
|
||||
[](http://www.gnu.org/licenses/gpl-3.0.en.html)
|
||||
|
||||
@@ -5,8 +5,6 @@ plugins {
|
||||
id 'kotlin-parcelize'
|
||||
}
|
||||
|
||||
def gitCommits = 'git rev-list --count HEAD'.execute([], rootDir).text.trim().toInteger()
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion '30.0.3'
|
||||
@@ -15,8 +13,8 @@ android {
|
||||
applicationId 'org.koitharu.kotatsu'
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode gitCommits
|
||||
versionName '1.0-rc3'
|
||||
versionCode 364
|
||||
versionName '1.0.1'
|
||||
|
||||
kapt {
|
||||
arguments {
|
||||
@@ -65,23 +63,23 @@ dependencies {
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2'
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.5.0-beta03'
|
||||
implementation 'androidx.activity:activity-ktx:1.2.1'
|
||||
implementation 'androidx.fragment:fragment-ktx:1.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-service:2.3.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-process:2.3.0'
|
||||
implementation 'androidx.core:core-ktx:1.5.0-rc01'
|
||||
implementation 'androidx.activity:activity-ktx:1.2.2'
|
||||
implementation 'androidx.fragment:fragment-ktx:1.3.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-service:2.3.1'
|
||||
implementation 'androidx.lifecycle:lifecycle-process:2.3.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
||||
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.0-beta02'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.0-rc01'
|
||||
implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01'
|
||||
implementation 'androidx.preference:preference-ktx:1.1.1'
|
||||
implementation 'androidx.work:work-runtime-ktx:2.5.0'
|
||||
implementation 'com.google.android.material:material:1.3.0'
|
||||
//noinspection LifecycleAnnotationProcessorWithJava8
|
||||
kapt 'androidx.lifecycle:lifecycle-compiler:2.3.0'
|
||||
kapt 'androidx.lifecycle:lifecycle-compiler:2.3.1'
|
||||
|
||||
implementation 'androidx.room:room-runtime:2.2.6'
|
||||
implementation 'androidx.room:room-ktx:2.2.6'
|
||||
|
||||
@@ -88,12 +88,12 @@ class PageLoader(
|
||||
}
|
||||
|
||||
suspend fun convertInPlace(file: File) {
|
||||
convertLock.withLock(file) {
|
||||
convertLock.withLock(Lock) {
|
||||
withContext(Dispatchers.Default) {
|
||||
val image = BitmapFactory.decodeFile(file.absolutePath)
|
||||
try {
|
||||
file.outputStream().use { out ->
|
||||
image.compress(Bitmap.CompressFormat.WEBP, 100, out)
|
||||
image.compress(Bitmap.CompressFormat.PNG, 100, out)
|
||||
}
|
||||
} finally {
|
||||
image.recycle()
|
||||
@@ -101,4 +101,6 @@ class PageLoader(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private companion object Lock
|
||||
}
|
||||
@@ -12,7 +12,9 @@ import org.koitharu.kotatsu.reader.ui.ReaderState
|
||||
import org.koitharu.kotatsu.reader.ui.pager.BaseReader
|
||||
import org.koitharu.kotatsu.reader.ui.pager.BaseReaderAdapter
|
||||
import org.koitharu.kotatsu.reader.ui.pager.ReaderPage
|
||||
import org.koitharu.kotatsu.reader.ui.pager.standard.PagerReaderFragment
|
||||
import org.koitharu.kotatsu.utils.ext.*
|
||||
import kotlin.math.absoluteValue
|
||||
|
||||
class ReversedReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
|
||||
|
||||
@@ -58,7 +60,10 @@ class ReversedReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
|
||||
}
|
||||
|
||||
override fun switchPageTo(position: Int, smooth: Boolean) {
|
||||
binding.pager.setCurrentItem(reversed(position), smooth)
|
||||
binding.pager.setCurrentItem(
|
||||
reversed(position),
|
||||
smooth && (binding.pager.currentItem - position).absoluteValue < PagerReaderFragment.SMOOTH_SCROLL_LIMIT
|
||||
)
|
||||
}
|
||||
|
||||
override fun onPagesChanged(pages: List<ReaderPage>, pendingState: ReaderState?) {
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.koitharu.kotatsu.reader.ui.pager.BaseReader
|
||||
import org.koitharu.kotatsu.reader.ui.pager.BaseReaderAdapter
|
||||
import org.koitharu.kotatsu.reader.ui.pager.ReaderPage
|
||||
import org.koitharu.kotatsu.utils.ext.*
|
||||
import kotlin.math.absoluteValue
|
||||
|
||||
class PagerReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
|
||||
|
||||
@@ -78,7 +79,10 @@ class PagerReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
|
||||
}
|
||||
|
||||
override fun switchPageTo(position: Int, smooth: Boolean) {
|
||||
binding.pager.setCurrentItem(position, smooth)
|
||||
binding.pager.setCurrentItem(
|
||||
position,
|
||||
smooth && (binding.pager.currentItem - position).absoluteValue < SMOOTH_SCROLL_LIMIT
|
||||
)
|
||||
}
|
||||
|
||||
override fun getCurrentState(): ReaderState? = bindingOrNull()?.run {
|
||||
@@ -94,4 +98,9 @@ class PagerReaderFragment : BaseReader<FragmentReaderStandardBinding>() {
|
||||
private fun notifyPageChanged(page: Int) {
|
||||
viewModel.onCurrentPageChanged(page)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
const val SMOOTH_SCROLL_LIMIT = 3
|
||||
}
|
||||
}
|
||||
@@ -88,10 +88,6 @@ class WebtoonReaderFragment : BaseReader<FragmentReaderWebtoonBinding>() {
|
||||
}
|
||||
|
||||
override fun switchPageTo(position: Int, smooth: Boolean) {
|
||||
if (smooth) {
|
||||
binding.recyclerView.smoothScrollToPosition(position)
|
||||
} else {
|
||||
binding.recyclerView.firstItem = position
|
||||
}
|
||||
binding.recyclerView.firstItem = position
|
||||
}
|
||||
}
|
||||
@@ -23,13 +23,14 @@
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
style="@style/Widget.MaterialComponents.TabLayout.Colored"
|
||||
style="@style/Widget.MaterialComponents.TabLayout.PrimarySurface"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end"
|
||||
android:background="@android:color/transparent"
|
||||
app:tabGravity="start"
|
||||
app:tabMode="scrollable" />
|
||||
app:tabMode="scrollable"
|
||||
app:tabSelectedTextColor="?colorOnPrimarySurface" />
|
||||
|
||||
</com.google.android.material.appbar.MaterialToolbar>
|
||||
|
||||
|
||||
1
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -4,3 +4,4 @@ distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
|
||||
distributionSha256Sum=22449f5231796abd892c98b2a07c9ceebe4688d192cd2d6763f8e3bf8acbedeb
|
||||
12
metadata/en-US/full_description.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Kotatsu is a free and open source manga reader for Android.<br>
|
||||
Main Features:
|
||||
<ul>
|
||||
<li>Online manga catalogues</li>
|
||||
<li>Search manga by name and genre</li>
|
||||
<li>Reading history</li>
|
||||
<li>Favourites organized by user-defined categories</li>
|
||||
<li>Downloading manga and reading it offline. Third-party CBZ archives also supported</li>
|
||||
<li>Tablet-optimized material design UI</li>
|
||||
<li>Standard and Webtoon-optimized reader</li>
|
||||
<li>Notifications about new chapters with updates feed</li>
|
||||
</ul>
|
||||
BIN
metadata/en-US/images/phoneScreenshots/1.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
metadata/en-US/images/phoneScreenshots/2.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
metadata/en-US/images/phoneScreenshots/3.png
Normal file
|
After Width: | Height: | Size: 116 KiB |
BIN
metadata/en-US/images/phoneScreenshots/4.png
Normal file
|
After Width: | Height: | Size: 281 KiB |
BIN
metadata/en-US/images/phoneScreenshots/5.png
Normal file
|
After Width: | Height: | Size: 220 KiB |
BIN
metadata/en-US/images/phoneScreenshots/6.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
metadata/en-US/images/tenInchScreenshots/1.png
Normal file
|
After Width: | Height: | Size: 295 KiB |
BIN
metadata/en-US/images/tenInchScreenshots/2.png
Normal file
|
After Width: | Height: | Size: 193 KiB |
1
metadata/en-US/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Manga reader with online catalogues
|
||||
12
metadata/ru/full_description.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Kotatsu - приложения для чтения манги с открытым исходным кодом.<br>
|
||||
Основные возможности:
|
||||
<ul>
|
||||
<li>Онлайн каталоги с мангой</li>
|
||||
<li>Поиск манги по имени и жанрам</li>
|
||||
<li>История чтения</li>
|
||||
<li>Избранное с пользовательскими категориями</li>
|
||||
<li>Возможность сохранять мангу и читать её оффлайн. Поддержка сторонних комиксов в формате CBZ</li>
|
||||
<li>Интерфейс также оптимизирован для планшетов</li>
|
||||
<li>Поддержка манхвы (Webtoon)</li>
|
||||
<li>Уведомления о новых главах и лента обновлений</li>
|
||||
</ul>
|
||||
BIN
metadata/ru/images/phoneScreenshots/1.png
Normal file
|
After Width: | Height: | Size: 75 KiB |
BIN
metadata/ru/images/phoneScreenshots/2.png
Normal file
|
After Width: | Height: | Size: 161 KiB |
BIN
metadata/ru/images/phoneScreenshots/3.png
Normal file
|
After Width: | Height: | Size: 113 KiB |
BIN
metadata/ru/images/phoneScreenshots/4.png
Normal file
|
After Width: | Height: | Size: 173 KiB |
BIN
metadata/ru/images/phoneScreenshots/5.png
Normal file
|
After Width: | Height: | Size: 190 KiB |
BIN
metadata/ru/images/phoneScreenshots/6.png
Normal file
|
After Width: | Height: | Size: 68 KiB |
BIN
metadata/ru/images/tenInchScreenshots/1.png
Normal file
|
After Width: | Height: | Size: 272 KiB |
BIN
metadata/ru/images/tenInchScreenshots/2.png
Normal file
|
After Width: | Height: | Size: 177 KiB |
1
metadata/ru/short_description.txt
Normal file
@@ -0,0 +1 @@
|
||||
Приложение для чтения манги с онлайн каталогами
|
||||