Added missing files
This commit is contained in:
@@ -13,8 +13,13 @@ android {
|
|||||||
applicationId "xyz.quaver.pupil"
|
applicationId "xyz.quaver.pupil"
|
||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
|
<<<<<<< HEAD
|
||||||
versionCode 27
|
versionCode 27
|
||||||
versionName "3.2-beta2"
|
versionName "3.2-beta2"
|
||||||
|
=======
|
||||||
|
versionCode 26
|
||||||
|
versionName "3.2-beta"
|
||||||
|
>>>>>>> origin/development
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
@@ -26,7 +31,10 @@ android {
|
|||||||
}
|
}
|
||||||
buildTypes.each {
|
buildTypes.each {
|
||||||
it.buildConfigField('boolean', 'PRERELEASE', 'true')
|
it.buildConfigField('boolean', 'PRERELEASE', 'true')
|
||||||
|
<<<<<<< HEAD
|
||||||
it.buildConfigField('boolean', 'CENSOR', 'false')
|
it.buildConfigField('boolean', 'CENSOR', 'false')
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
@@ -56,9 +64,15 @@ dependencies {
|
|||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
|
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
|
||||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||||
implementation 'com.android.support:multidex:1.0.3'
|
implementation 'com.android.support:multidex:1.0.3'
|
||||||
|
<<<<<<< HEAD
|
||||||
implementation 'com.google.android.material:material:1.1.0-alpha09'
|
implementation 'com.google.android.material:material:1.1.0-alpha09'
|
||||||
implementation 'com.google.firebase:firebase-core:17.1.0'
|
implementation 'com.google.firebase:firebase-core:17.1.0'
|
||||||
implementation 'com.google.firebase:firebase-perf:19.0.0'
|
implementation 'com.google.firebase:firebase-perf:19.0.0'
|
||||||
|
=======
|
||||||
|
implementation 'com.google.android.material:material:1.1.0-alpha08'
|
||||||
|
implementation 'com.google.firebase:firebase-core:17.0.1'
|
||||||
|
implementation 'com.google.firebase:firebase-perf:18.0.1'
|
||||||
|
>>>>>>> origin/development
|
||||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||||
implementation 'com.github.arimorty:floatingsearchview:2.1.1'
|
implementation 'com.github.arimorty:floatingsearchview:2.1.1'
|
||||||
implementation 'com.github.clans:fab:1.6.4'
|
implementation 'com.github.clans:fab:1.6.4'
|
||||||
@@ -67,7 +81,10 @@ dependencies {
|
|||||||
transitive = false
|
transitive = false
|
||||||
}
|
}
|
||||||
implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'
|
implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'
|
||||||
|
<<<<<<< HEAD
|
||||||
implementation 'com.jsibbold:zoomage:1.3.0'
|
implementation 'com.jsibbold:zoomage:1.3.0'
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
implementation "ru.noties.markwon:core:${markwonVersion}"
|
implementation "ru.noties.markwon:core:${markwonVersion}"
|
||||||
kapt 'com.github.bumptech.glide:compiler:4.9.0'
|
kapt 'com.github.bumptech.glide:compiler:4.9.0'
|
||||||
testImplementation 'junit:junit:4.12'
|
testImplementation 'junit:junit:4.12'
|
||||||
|
|||||||
@@ -41,7 +41,10 @@ import kotlinx.serialization.json.Json
|
|||||||
import kotlinx.serialization.json.JsonConfiguration
|
import kotlinx.serialization.json.JsonConfiguration
|
||||||
import xyz.quaver.hitomi.GalleryBlock
|
import xyz.quaver.hitomi.GalleryBlock
|
||||||
import xyz.quaver.hitomi.Reader
|
import xyz.quaver.hitomi.Reader
|
||||||
|
<<<<<<< HEAD
|
||||||
import xyz.quaver.pupil.BuildConfig
|
import xyz.quaver.pupil.BuildConfig
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
import xyz.quaver.pupil.Pupil
|
import xyz.quaver.pupil.Pupil
|
||||||
import xyz.quaver.pupil.R
|
import xyz.quaver.pupil.R
|
||||||
import xyz.quaver.pupil.types.Tag
|
import xyz.quaver.pupil.types.Tag
|
||||||
@@ -87,10 +90,13 @@ class GalleryBlockAdapter(private val glide: RequestManager, private val galleri
|
|||||||
.skipMemoryCache(true)
|
.skipMemoryCache(true)
|
||||||
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
.error(R.drawable.image_broken_variant)
|
.error(R.drawable.image_broken_variant)
|
||||||
|
<<<<<<< HEAD
|
||||||
.apply {
|
.apply {
|
||||||
if (BuildConfig.CENSOR)
|
if (BuildConfig.CENSOR)
|
||||||
override(5, 8)
|
override(5, 8)
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
.into(galleryblock_thumbnail)
|
.into(galleryblock_thumbnail)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,19 +18,30 @@
|
|||||||
|
|
||||||
package xyz.quaver.pupil.adapters
|
package xyz.quaver.pupil.adapters
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.bumptech.glide.RequestManager
|
import com.bumptech.glide.RequestManager
|
||||||
|
<<<<<<< HEAD
|
||||||
import com.bumptech.glide.load.DataSource
|
import com.bumptech.glide.load.DataSource
|
||||||
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
import com.bumptech.glide.load.engine.GlideException
|
import com.bumptech.glide.load.engine.GlideException
|
||||||
import com.bumptech.glide.request.RequestListener
|
import com.bumptech.glide.request.RequestListener
|
||||||
import com.bumptech.glide.request.target.Target
|
import com.bumptech.glide.request.target.Target
|
||||||
import xyz.quaver.pupil.BuildConfig
|
import xyz.quaver.pupil.BuildConfig
|
||||||
|
=======
|
||||||
|
import com.bumptech.glide.load.engine.DiskCacheStrategy
|
||||||
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.runBlocking
|
||||||
|
>>>>>>> origin/development
|
||||||
import xyz.quaver.pupil.R
|
import xyz.quaver.pupil.R
|
||||||
import xyz.quaver.pupil.util.getCachedGallery
|
import xyz.quaver.pupil.util.getCachedGallery
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@@ -39,8 +50,14 @@ class ReaderAdapter(private val glide: RequestManager,
|
|||||||
private val galleryID: Int,
|
private val galleryID: Int,
|
||||||
private val images: List<String>) : RecyclerView.Adapter<ReaderAdapter.ViewHolder>() {
|
private val images: List<String>) : RecyclerView.Adapter<ReaderAdapter.ViewHolder>() {
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
var isFullScreen = false
|
var isFullScreen = false
|
||||||
private var prev : Drawable? = null
|
private var prev : Drawable? = null
|
||||||
|
=======
|
||||||
|
class ReaderAdapter(private val glide: RequestManager, private val images: List<String>) : RecyclerView.Adapter<ReaderAdapter.ViewHolder>() {
|
||||||
|
|
||||||
|
var isFullScreen = false
|
||||||
|
>>>>>>> origin/development
|
||||||
|
|
||||||
class ViewHolder(val view: View) : RecyclerView.ViewHolder(view)
|
class ViewHolder(val view: View) : RecyclerView.ViewHolder(view)
|
||||||
|
|
||||||
@@ -53,6 +70,7 @@ class ReaderAdapter(private val glide: RequestManager,
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
|
<<<<<<< HEAD
|
||||||
holder.view as ImageView
|
holder.view as ImageView
|
||||||
|
|
||||||
glide
|
glide
|
||||||
@@ -88,6 +106,21 @@ class ReaderAdapter(private val glide: RequestManager,
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.into(holder.view)
|
.into(holder.view)
|
||||||
|
=======
|
||||||
|
runBlocking {
|
||||||
|
CoroutineScope(Dispatchers.Default).launch {
|
||||||
|
val image = glide
|
||||||
|
.load(images[position])
|
||||||
|
.diskCacheStrategy(DiskCacheStrategy.NONE)
|
||||||
|
.skipMemoryCache(true)
|
||||||
|
.error(R.drawable.image_broken_variant)
|
||||||
|
.submit()
|
||||||
|
.get()
|
||||||
|
|
||||||
|
(holder.view as ImageView).setImageDrawable(image)
|
||||||
|
}.join()
|
||||||
|
}
|
||||||
|
>>>>>>> origin/development
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getItemCount() = images.size
|
override fun getItemCount() = images.size
|
||||||
|
|||||||
@@ -22,7 +22,10 @@ import android.view.ViewGroup
|
|||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.bumptech.glide.RequestManager
|
import com.bumptech.glide.RequestManager
|
||||||
|
<<<<<<< HEAD
|
||||||
import xyz.quaver.pupil.BuildConfig
|
import xyz.quaver.pupil.BuildConfig
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
|
|
||||||
class ThumbnailAdapter(private val glide: RequestManager, private val thumbnails: List<String>) : RecyclerView.Adapter<ThumbnailAdapter.ViewHolder>() {
|
class ThumbnailAdapter(private val glide: RequestManager, private val thumbnails: List<String>) : RecyclerView.Adapter<ThumbnailAdapter.ViewHolder>() {
|
||||||
|
|
||||||
@@ -35,10 +38,13 @@ class ThumbnailAdapter(private val glide: RequestManager, private val thumbnails
|
|||||||
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
|
||||||
glide
|
glide
|
||||||
.load(thumbnails[position])
|
.load(thumbnails[position])
|
||||||
|
<<<<<<< HEAD
|
||||||
.apply {
|
.apply {
|
||||||
if (BuildConfig.CENSOR)
|
if (BuildConfig.CENSOR)
|
||||||
override(5, 8)
|
override(5, 8)
|
||||||
}
|
}
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
.into(holder.view)
|
.into(holder.view)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,14 @@ import kotlinx.serialization.ImplicitReflectionSerializer
|
|||||||
import xyz.quaver.pupil.Pupil
|
import xyz.quaver.pupil.Pupil
|
||||||
import xyz.quaver.pupil.R
|
import xyz.quaver.pupil.R
|
||||||
import xyz.quaver.pupil.adapters.ReaderAdapter
|
import xyz.quaver.pupil.adapters.ReaderAdapter
|
||||||
|
<<<<<<< HEAD:app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt
|
||||||
import xyz.quaver.pupil.util.*
|
import xyz.quaver.pupil.util.*
|
||||||
|
=======
|
||||||
|
import xyz.quaver.pupil.util.GalleryDownloader
|
||||||
|
import xyz.quaver.pupil.util.Histories
|
||||||
|
import xyz.quaver.pupil.util.ItemClickSupport
|
||||||
|
import xyz.quaver.pupil.util.hasPermission
|
||||||
|
>>>>>>> origin/development:app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
|
||||||
|
|
||||||
class ReaderActivity : AppCompatActivity() {
|
class ReaderActivity : AppCompatActivity() {
|
||||||
|
|
||||||
@@ -218,6 +225,7 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD:app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt
|
||||||
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
|
override fun onKeyDown(keyCode: Int, event: KeyEvent?): Boolean {
|
||||||
//currentPage is 1-based
|
//currentPage is 1-based
|
||||||
return when(keyCode) {
|
return when(keyCode) {
|
||||||
@@ -235,6 +243,8 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development:app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
|
||||||
private fun initDownloader() {
|
private fun initDownloader() {
|
||||||
var d: GalleryDownloader? = GalleryDownloader.get(galleryID)
|
var d: GalleryDownloader? = GalleryDownloader.get(galleryID)
|
||||||
|
|
||||||
@@ -277,12 +287,16 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
onErrorHandler = {
|
onErrorHandler = {
|
||||||
|
<<<<<<< HEAD:app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt
|
||||||
Snackbar
|
Snackbar
|
||||||
.make(reader_layout, it.message ?: it.javaClass.name, Snackbar.LENGTH_INDEFINITE)
|
.make(reader_layout, it.message ?: it.javaClass.name, Snackbar.LENGTH_INDEFINITE)
|
||||||
.setAction(R.string.reader_help) { view ->
|
.setAction(R.string.reader_help) { view ->
|
||||||
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.error_help))))
|
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.error_help))))
|
||||||
}
|
}
|
||||||
.show()
|
.show()
|
||||||
|
=======
|
||||||
|
Snackbar.make(reader_layout, it.message ?: it.javaClass.name, Snackbar.LENGTH_INDEFINITE).show()
|
||||||
|
>>>>>>> origin/development:app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
|
||||||
downloader.download = false
|
downloader.download = false
|
||||||
}
|
}
|
||||||
onCompleteHandler = {
|
onCompleteHandler = {
|
||||||
@@ -330,7 +344,11 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
private fun initView() {
|
private fun initView() {
|
||||||
with(reader_recyclerview) {
|
with(reader_recyclerview) {
|
||||||
|
<<<<<<< HEAD:app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt
|
||||||
adapter = ReaderAdapter(Glide.with(this@ReaderActivity), galleryID, images)
|
adapter = ReaderAdapter(Glide.with(this@ReaderActivity), galleryID, images)
|
||||||
|
=======
|
||||||
|
adapter = ReaderAdapter(Glide.with(this@ReaderActivity), images)
|
||||||
|
>>>>>>> origin/development:app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
|
||||||
|
|
||||||
addOnScrollListener(object: RecyclerView.OnScrollListener() {
|
addOnScrollListener(object: RecyclerView.OnScrollListener() {
|
||||||
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
|
||||||
@@ -360,7 +378,11 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
scrollMode(false)
|
scrollMode(false)
|
||||||
fullscreen(true)
|
fullscreen(true)
|
||||||
} else {
|
} else {
|
||||||
|
<<<<<<< HEAD:app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt
|
||||||
(reader_recyclerview.layoutManager as LinearLayoutManager?)?.scrollToPosition(currentPage) //Moves to next page because currentPage is 1-based indexing
|
(reader_recyclerview.layoutManager as LinearLayoutManager?)?.scrollToPosition(currentPage) //Moves to next page because currentPage is 1-based indexing
|
||||||
|
=======
|
||||||
|
(reader_recyclerview.layoutManager as LinearLayoutManager?)?.scrollToPosition(currentPage)
|
||||||
|
>>>>>>> origin/development:app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -368,6 +390,7 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
with(reader_fab_download) {
|
with(reader_fab_download) {
|
||||||
setImageResource(R.drawable.ic_download)
|
setImageResource(R.drawable.ic_download)
|
||||||
setOnClickListener {
|
setOnClickListener {
|
||||||
|
<<<<<<< HEAD:app/src/main/java/xyz/quaver/pupil/ui/ReaderActivity.kt
|
||||||
|
|
||||||
if (!this@ReaderActivity.hasPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
|
if (!this@ReaderActivity.hasPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
|
||||||
AlertDialog.Builder(this@ReaderActivity).apply {
|
AlertDialog.Builder(this@ReaderActivity).apply {
|
||||||
@@ -381,6 +404,21 @@ class ReaderActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
downloader.download = !downloader.download
|
downloader.download = !downloader.download
|
||||||
|
|
||||||
|
=======
|
||||||
|
|
||||||
|
if (!this@ReaderActivity.hasPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
|
||||||
|
AlertDialog.Builder(this@ReaderActivity).apply {
|
||||||
|
setTitle(R.string.warning)
|
||||||
|
setMessage(R.string.update_no_permission)
|
||||||
|
setPositiveButton(android.R.string.ok) { _, _ -> }
|
||||||
|
}.show()
|
||||||
|
|
||||||
|
return@setOnClickListener
|
||||||
|
}
|
||||||
|
|
||||||
|
downloader.download = !downloader.download
|
||||||
|
|
||||||
|
>>>>>>> origin/development:app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
|
||||||
if (!downloader.download)
|
if (!downloader.download)
|
||||||
downloader.clearNotification()
|
downloader.clearNotification()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ import xyz.quaver.pupil.util.Lock
|
|||||||
import xyz.quaver.pupil.util.LockManager
|
import xyz.quaver.pupil.util.LockManager
|
||||||
import xyz.quaver.pupil.util.getDownloadDirectory
|
import xyz.quaver.pupil.util.getDownloadDirectory
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class SettingsActivity : AppCompatActivity() {
|
class SettingsActivity : AppCompatActivity() {
|
||||||
|
|
||||||
@@ -279,7 +278,7 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
s ?: return
|
s ?: return
|
||||||
|
|
||||||
if (s.any { it.isUpperCase() })
|
if (s.any { it.isUpperCase() })
|
||||||
s.replace(0, s.length, s.toString().toLowerCase(Locale.getDefault()))
|
s.replace(0, s.length, s.toString().toLowerCase())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -353,38 +352,6 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
with(findPreference<Preference>("nomedia")) {
|
|
||||||
this!!
|
|
||||||
|
|
||||||
onPreferenceChangeListener = Preference.OnPreferenceChangeListener { _, newValue ->
|
|
||||||
val directories = listOf(
|
|
||||||
context.cacheDir,
|
|
||||||
getDownloadDirectory(context)
|
|
||||||
)
|
|
||||||
|
|
||||||
when (newValue as Boolean) {
|
|
||||||
true -> {
|
|
||||||
directories.forEach {
|
|
||||||
it ?: return@forEach
|
|
||||||
|
|
||||||
if (it.exists())
|
|
||||||
File(it, ".nomedia").createNewFile()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
false -> {
|
|
||||||
directories.forEach {
|
|
||||||
it ?: return@forEach
|
|
||||||
|
|
||||||
if (it.exists())
|
|
||||||
File(it, ".nomedia").delete()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,15 +63,24 @@ class GalleryDownloader(
|
|||||||
field = true
|
field = true
|
||||||
notificationManager.notify(galleryID, notificationBuilder.build())
|
notificationManager.notify(galleryID, notificationBuilder.build())
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
if (reader?.isActive == false && downloadJob?.isActive != true) {
|
if (reader?.isActive == false && downloadJob?.isActive != true) {
|
||||||
val data = File(getDownloadDirectory(this), galleryID.toString())
|
val data = File(getDownloadDirectory(this), galleryID.toString())
|
||||||
val cache = File(cacheDir, "imageCache/$galleryID")
|
val cache = File(cacheDir, "imageCache/$galleryID")
|
||||||
|
=======
|
||||||
|
val data = getCachedGallery(this, galleryID)
|
||||||
|
val cache = File(cacheDir, "imageCache/$galleryID")
|
||||||
|
>>>>>>> origin/development
|
||||||
|
|
||||||
if (File(cache, "images").exists() && !data.exists()) {
|
if (File(cache, "images").exists() && !data.exists()) {
|
||||||
cache.copyRecursively(data, true)
|
cache.copyRecursively(data, true)
|
||||||
cache.deleteRecursively()
|
cache.deleteRecursively()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
if (reader?.isActive == false && downloadJob?.isActive != true)
|
||||||
|
>>>>>>> origin/development
|
||||||
field = false
|
field = false
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,8 +179,11 @@ class GalleryDownloader(
|
|||||||
downloadJob = CoroutineScope(Dispatchers.Default).launch {
|
downloadJob = CoroutineScope(Dispatchers.Default).launch {
|
||||||
val reader = reader!!.await()
|
val reader = reader!!.await()
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
notificationBuilder.setContentTitle(reader.title)
|
notificationBuilder.setContentTitle(reader.title)
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
if (reader.readerItems.isEmpty()) {
|
if (reader.readerItems.isEmpty()) {
|
||||||
onErrorHandler?.invoke(IOException(getString(R.string.unable_to_connect)))
|
onErrorHandler?.invoke(IOException(getString(R.string.unable_to_connect)))
|
||||||
return@launch
|
return@launch
|
||||||
@@ -320,6 +332,14 @@ class GalleryDownloader(
|
|||||||
setProgress(0, 0, true)
|
setProgress(0, 0, true)
|
||||||
priority = NotificationCompat.PRIORITY_LOW
|
priority = NotificationCompat.PRIORITY_LOW
|
||||||
}
|
}
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
|
||||||
|
CoroutineScope(Dispatchers.Default).launch {
|
||||||
|
while (reader == null) ;
|
||||||
|
notificationBuilder.setContentTitle(reader.await().title)
|
||||||
|
}
|
||||||
|
>>>>>>> origin/development
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,11 @@
|
|||||||
<string name="settings_app_lock">アプリロック</string>
|
<string name="settings_app_lock">アプリロック</string>
|
||||||
<string name="settings_app_lock_type">アップロックの種類</string>
|
<string name="settings_app_lock_type">アップロックの種類</string>
|
||||||
<string name="settings_app_version_title">バージョン</string>
|
<string name="settings_app_version_title">バージョン</string>
|
||||||
|
<<<<<<< HEAD
|
||||||
<string name="settings_lock_biometrics">生体認識</string>
|
<string name="settings_lock_biometrics">生体認識</string>
|
||||||
|
=======
|
||||||
|
<string name="settings_lock_biomatrics">生体認識</string>
|
||||||
|
>>>>>>> origin/development
|
||||||
<string name="settings_lock_confirm">ロック確認のためもう一回入力してください。</string>
|
<string name="settings_lock_confirm">ロック確認のためもう一回入力してください。</string>
|
||||||
<string name="settings_lock_enabled">有効</string>
|
<string name="settings_lock_enabled">有効</string>
|
||||||
<string name="settings_lock_fingerprint">指紋</string>
|
<string name="settings_lock_fingerprint">指紋</string>
|
||||||
@@ -99,7 +103,10 @@
|
|||||||
<string name="gallery_tags">タグ</string>
|
<string name="gallery_tags">タグ</string>
|
||||||
<string name="gallery_thumbnails">サムネイル</string>
|
<string name="gallery_thumbnails">サムネイル</string>
|
||||||
<string name="gallery_related">おすすめ</string>
|
<string name="gallery_related">おすすめ</string>
|
||||||
|
<<<<<<< HEAD
|
||||||
<string name="settings_nomedia_summary">イメージを隠す</string>
|
<string name="settings_nomedia_summary">イメージを隠す</string>
|
||||||
<string name="settings_nomedia_title">イメージをギャラリーから見えなくする</string>
|
<string name="settings_nomedia_title">イメージをギャラリーから見えなくする</string>
|
||||||
<string name="reader_help">ヘルプ</string>
|
<string name="reader_help">ヘルプ</string>
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
</resources>
|
</resources>
|
||||||
@@ -70,7 +70,11 @@
|
|||||||
<string name="settings_app_lock">앱 잠금</string>
|
<string name="settings_app_lock">앱 잠금</string>
|
||||||
<string name="settings_app_lock_type">앱 잠금 종류</string>
|
<string name="settings_app_lock_type">앱 잠금 종류</string>
|
||||||
<string name="settings_app_version_title">앱 버전</string>
|
<string name="settings_app_version_title">앱 버전</string>
|
||||||
|
<<<<<<< HEAD
|
||||||
<string name="settings_lock_biometrics">생체 인식</string>
|
<string name="settings_lock_biometrics">생체 인식</string>
|
||||||
|
=======
|
||||||
|
<string name="settings_lock_biomatrics">생체 인식</string>
|
||||||
|
>>>>>>> origin/development
|
||||||
<string name="settings_lock_confirm">잠금 확인을 위해 한번 더 입력해주세요</string>
|
<string name="settings_lock_confirm">잠금 확인을 위해 한번 더 입력해주세요</string>
|
||||||
<string name="settings_lock_enabled">사용 중</string>
|
<string name="settings_lock_enabled">사용 중</string>
|
||||||
<string name="settings_lock_fingerprint">지문</string>
|
<string name="settings_lock_fingerprint">지문</string>
|
||||||
@@ -99,7 +103,10 @@
|
|||||||
<string name="gallery_tags">태그</string>
|
<string name="gallery_tags">태그</string>
|
||||||
<string name="gallery_related">관련 갤러리</string>
|
<string name="gallery_related">관련 갤러리</string>
|
||||||
<string name="gallery_thumbnails">미리보기</string>
|
<string name="gallery_thumbnails">미리보기</string>
|
||||||
|
<<<<<<< HEAD
|
||||||
<string name="settings_nomedia_summary">이미지 숨기기</string>
|
<string name="settings_nomedia_summary">이미지 숨기기</string>
|
||||||
<string name="settings_nomedia_title">갤러리에서 이미지 검색이 되지 않도록 합니다</string>
|
<string name="settings_nomedia_title">갤러리에서 이미지 검색이 되지 않도록 합니다</string>
|
||||||
<string name="reader_help">도움말</string>
|
<string name="reader_help">도움말</string>
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
</resources>
|
</resources>
|
||||||
@@ -127,14 +127,21 @@
|
|||||||
<string name="settings_security_mode_summary">Enable security mode to make the screen invisible on recent app window</string>
|
<string name="settings_security_mode_summary">Enable security mode to make the screen invisible on recent app window</string>
|
||||||
<string name="settings_dark_mode_title">Dark mode</string>
|
<string name="settings_dark_mode_title">Dark mode</string>
|
||||||
<string name="settings_dark_mode_summary">Protect yourself against light attacks!</string>
|
<string name="settings_dark_mode_summary">Protect yourself against light attacks!</string>
|
||||||
|
<<<<<<< HEAD
|
||||||
<string name="settings_nomedia_title">Hide image from gallery</string>
|
<string name="settings_nomedia_title">Hide image from gallery</string>
|
||||||
<string name="settings_nomedia_summary">Hides image from gallery</string>
|
<string name="settings_nomedia_summary">Hides image from gallery</string>
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
|
|
||||||
<string name="settings_lock_none">None</string>
|
<string name="settings_lock_none">None</string>
|
||||||
<string name="settings_lock_pattern">Pattern</string>
|
<string name="settings_lock_pattern">Pattern</string>
|
||||||
<string name="settings_lock_pin" translatable="false">PIN</string>
|
<string name="settings_lock_pin" translatable="false">PIN</string>
|
||||||
<string name="settings_lock_password">Password</string>
|
<string name="settings_lock_password">Password</string>
|
||||||
|
<<<<<<< HEAD
|
||||||
<string name="settings_lock_biometrics">Biometrics</string>
|
<string name="settings_lock_biometrics">Biometrics</string>
|
||||||
|
=======
|
||||||
|
<string name="settings_lock_biomatrics">Biomatrics</string>
|
||||||
|
>>>>>>> origin/development
|
||||||
<string name="settings_lock_fingerprint">Fingerprint</string>
|
<string name="settings_lock_fingerprint">Fingerprint</string>
|
||||||
<string name="settings_lock_enabled">Enabled</string>
|
<string name="settings_lock_enabled">Enabled</string>
|
||||||
<string name="settings_lock_confirm">Input same lock once more to confirm Lock</string>
|
<string name="settings_lock_confirm">Input same lock once more to confirm Lock</string>
|
||||||
|
|||||||
@@ -15,7 +15,11 @@
|
|||||||
app:key="lock_password"/>
|
app:key="lock_password"/>
|
||||||
|
|
||||||
<PreferenceCategory
|
<PreferenceCategory
|
||||||
|
<<<<<<< HEAD
|
||||||
app:title="@string/settings_lock_biometrics">
|
app:title="@string/settings_lock_biometrics">
|
||||||
|
=======
|
||||||
|
app:title="@string/settings_lock_biomatrics">
|
||||||
|
>>>>>>> origin/development
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
app:title="@string/settings_lock_fingerprint"
|
app:title="@string/settings_lock_fingerprint"
|
||||||
|
|||||||
@@ -69,11 +69,14 @@
|
|||||||
app:title="@string/settings_dark_mode_title"
|
app:title="@string/settings_dark_mode_title"
|
||||||
app:summary="@string/settings_dark_mode_summary"/>
|
app:summary="@string/settings_dark_mode_summary"/>
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
app:key="nomedia"
|
app:key="nomedia"
|
||||||
app:title="@string/settings_nomedia_title"
|
app:title="@string/settings_nomedia_title"
|
||||||
app:summary="@string/settings_nomedia_title"/>
|
app:summary="@string/settings_nomedia_title"/>
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> origin/development
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
</androidx.preference.PreferenceScreen>
|
</androidx.preference.PreferenceScreen>
|
||||||
|
|||||||
16
build.gradle
16
build.gradle
@@ -1,7 +1,11 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
<<<<<<< HEAD
|
||||||
ext.kotlin_version = '1.3.50'
|
ext.kotlin_version = '1.3.50'
|
||||||
|
=======
|
||||||
|
ext.kotlin_version = '1.3.41'
|
||||||
|
>>>>>>> origin/development
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
jcenter()
|
jcenter()
|
||||||
@@ -10,6 +14,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
|
<<<<<<< HEAD
|
||||||
classpath 'com.android.tools.build:gradle:3.5.0'
|
classpath 'com.android.tools.build:gradle:3.5.0'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
|
||||||
@@ -19,6 +24,17 @@ buildscript {
|
|||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
classpath 'io.fabric.tools:gradle:1.29.0'
|
classpath 'io.fabric.tools:gradle:1.29.0'
|
||||||
classpath 'com.google.firebase:perf-plugin:1.3.1'
|
classpath 'com.google.firebase:perf-plugin:1.3.1'
|
||||||
|
=======
|
||||||
|
classpath 'com.android.tools.build:gradle:3.4.2'
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
|
||||||
|
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
|
||||||
|
classpath 'com.google.gms:google-services:4.3.0'
|
||||||
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
|
// in the individual module build.gradle files
|
||||||
|
classpath 'io.fabric.tools:gradle:1.29.0'
|
||||||
|
classpath 'com.google.firebase:perf-plugin:1.3.0'
|
||||||
|
>>>>>>> origin/development
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user