Compare commits
11 Commits
4.2-beta1
...
4.2-beta2-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18aede2701 | ||
|
|
c59d08a0a1 | ||
|
|
66ae29eb5b | ||
|
|
7d9cb3e150 | ||
|
|
9922a9f82a | ||
|
|
445b9b4673 | ||
|
|
0ef7b358e0 | ||
|
|
2d3fb75576 | ||
|
|
d55ff6d68e | ||
|
|
079654a9c7 | ||
|
|
30263c6260 |
@@ -14,7 +14,7 @@ android {
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 29
|
||||
versionCode 31
|
||||
versionName "4.2-beta1"
|
||||
versionName "4.2-beta2-hotfix2"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
multiDexEnabled true
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
@@ -25,7 +25,7 @@ android {
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
buildTypes.each {
|
||||
it.buildConfigField('boolean', 'PRERELEASE', 'false')
|
||||
it.buildConfigField('boolean', 'PRERELEASE', 'true')
|
||||
it.buildConfigField('boolean', 'CENSOR', 'false')
|
||||
}
|
||||
}
|
||||
@@ -55,12 +55,12 @@ dependencies {
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation "androidx.biometric:biometric:1.0.0"
|
||||
implementation "androidx.biometric:biometric:1.0.1"
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation "com.daimajia.swipelayout:library:1.2.0@aar"
|
||||
implementation 'com.google.android.material:material:1.2.0-alpha02'
|
||||
implementation 'com.google.android.material:material:1.2.0-alpha03'
|
||||
implementation 'com.google.firebase:firebase-core:17.2.1'
|
||||
implementation 'com.google.firebase:firebase-perf:19.0.3'
|
||||
implementation 'com.google.firebase:firebase-perf:19.0.4'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
implementation 'com.github.arimorty:floatingsearchview:2.1.1'
|
||||
implementation 'com.github.clans:fab:1.6.4'
|
||||
|
||||
@@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":31,"versionName":"4.2-beta1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":31,"versionName":"4.2-beta2-hotfix2","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}]
|
||||
@@ -95,7 +95,6 @@ class GalleryBlockAdapter(private val glide: RequestManager, private val galleri
|
||||
if (BuildConfig.CENSOR)
|
||||
override(5, 8)
|
||||
}
|
||||
.fitCenter()
|
||||
.into(galleryblock_thumbnail)
|
||||
}
|
||||
|
||||
|
||||
@@ -49,17 +49,21 @@ class ReaderAdapter(private val glide: RequestManager,
|
||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||
holder.view as ImageView
|
||||
|
||||
if (isFullScreen)
|
||||
holder.view.layoutParams.height = RecyclerView.LayoutParams.MATCH_PARENT
|
||||
else
|
||||
holder.view.layoutParams.height = RecyclerView.LayoutParams.WRAP_CONTENT
|
||||
|
||||
glide
|
||||
.load(File(getCachedGallery(holder.view.context, galleryID), images[position]))
|
||||
.dontTransform()
|
||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||
.skipMemoryCache(true)
|
||||
.error(R.drawable.image_broken_variant)
|
||||
.dontTransform()
|
||||
.apply {
|
||||
if (BuildConfig.CENSOR)
|
||||
override(5, 8)
|
||||
}
|
||||
.fitCenter()
|
||||
.into(holder.view)
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ class ThumbnailAdapter(private val glide: RequestManager, private val thumbnails
|
||||
if (BuildConfig.CENSOR)
|
||||
override(5, 8)
|
||||
}
|
||||
.fitCenter()
|
||||
.into(holder.view)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,16 +20,21 @@ package xyz.quaver.pupil.util
|
||||
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import androidx.core.content.ContextCompat
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
//Android Q+ uses scoped storage thus not requiring permission
|
||||
fun Context.hasPermission(permission: String) =
|
||||
ContextCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED
|
||||
Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q || ContextCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED
|
||||
|
||||
@UseExperimental(ExperimentalStdlibApi::class)
|
||||
fun String.wordCapitalize() : String {
|
||||
val result = ArrayList<String>()
|
||||
|
||||
for (word in this.split(" "))
|
||||
result.add(word.capitalize())
|
||||
result.add(word.capitalize(Locale.getDefault()))
|
||||
|
||||
return result.joinToString(" ")
|
||||
}
|
||||
@@ -81,9 +81,14 @@ fun getOldReaderGalleries(context: Context) : List<File> {
|
||||
if (!readerFile.exists())
|
||||
return@let
|
||||
|
||||
Json(JsonConfiguration.Stable).parseJson(readerFile.readText()).jsonObject.let { reader ->
|
||||
if (!reader.contains("code"))
|
||||
oldGallery.add(gallery)
|
||||
try {
|
||||
Json(JsonConfiguration.Stable).parseJson(readerFile.readText())
|
||||
.jsonObject.let { reader ->
|
||||
if (!reader.contains("code"))
|
||||
oldGallery.add(gallery)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -109,7 +114,8 @@ fun updateOldReaderGalleries(context: Context) {
|
||||
reader["code"] = when {
|
||||
(File(gallery, "images").list()?.
|
||||
all { !it.endsWith("webp") } ?: return@forEach) &&
|
||||
availableInHiyobi(gallery.name.toInt()) -> json.toJson(codeSerializer, Reader.Code.HIYOBI)
|
||||
availableInHiyobi(gallery.name.toIntOrNull() ?: return@forEach)
|
||||
-> json.toJson(codeSerializer, Reader.Code.HIYOBI)
|
||||
else -> json.toJson(codeSerializer, Reader.Code.HITOMI)
|
||||
}
|
||||
|
||||
|
||||
@@ -26,18 +26,11 @@
|
||||
android:background="@color/dark_gray"
|
||||
tools:context=".ui.ReaderActivity">
|
||||
|
||||
<LinearLayout
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/reader_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/reader_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
|
||||
</LinearLayout>
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
||||
@@ -22,6 +22,4 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="100dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:scaleType="fitCenter"
|
||||
android:adjustViewBounds="true"/>
|
||||
android:paddingBottom="8dp"/>
|
||||
@@ -7,7 +7,7 @@ dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.2.1'
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.14.0"
|
||||
implementation 'org.jsoup:jsoup:1.11.3'
|
||||
implementation 'org.jsoup:jsoup:1.12.1'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user