diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1bdffc64..2a9ea385 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -25,7 +25,7 @@
android:resource="@xml/filepaths"/>
-
- val intent = Intent(this@MainActivity, GalleryActivity::class.java)
+ val intent = Intent(this@MainActivity, ReaderActivity::class.java)
intent.putExtra("GALLERY_ID", galleryID)
intent.putExtra("GALLERY_TITLE", title)
diff --git a/app/src/main/java/xyz/quaver/pupil/GalleryActivity.kt b/app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
similarity index 90%
rename from app/src/main/java/xyz/quaver/pupil/GalleryActivity.kt
rename to app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
index f134bcce..15a929cd 100644
--- a/app/src/main/java/xyz/quaver/pupil/GalleryActivity.kt
+++ b/app/src/main/java/xyz/quaver/pupil/ReaderActivity.kt
@@ -7,7 +7,7 @@ import android.view.View
import android.view.WindowManager
import androidx.appcompat.app.AppCompatActivity
import androidx.preference.PreferenceManager
-import kotlinx.android.synthetic.main.activity_gallery.*
+import kotlinx.android.synthetic.main.activity_reader.*
import kotlinx.coroutines.*
import xyz.quaver.hitomi.Reader
import xyz.quaver.hitomi.getReader
@@ -18,7 +18,7 @@ import java.io.FileOutputStream
import java.net.URL
import javax.net.ssl.HttpsURLConnection
-class GalleryActivity : AppCompatActivity() {
+class ReaderActivity : AppCompatActivity() {
private val images = ArrayList()
private var galleryID = 0
@@ -34,7 +34,7 @@ class GalleryActivity : AppCompatActivity() {
WindowManager.LayoutParams.FLAG_SECURE,
WindowManager.LayoutParams.FLAG_SECURE)
- setContentView(R.layout.activity_gallery)
+ setContentView(R.layout.activity_reader)
supportActionBar?.title = intent.getStringExtra("GALLERY_TITLE")
@@ -42,7 +42,7 @@ class GalleryActivity : AppCompatActivity() {
CoroutineScope(Dispatchers.Unconfined).launch {
reader = async(Dispatchers.IO) {
Log.d("Pupil", "Loading reader")
- val preference = PreferenceManager.getDefaultSharedPreferences(this@GalleryActivity)
+ val preference = PreferenceManager.getDefaultSharedPreferences(this@ReaderActivity)
if (preference.getBoolean("use_hiyobi", false)) {
try {
xyz.quaver.hiyobi.getReader(galleryID)
@@ -82,7 +82,7 @@ class GalleryActivity : AppCompatActivity() {
}
private fun initView() {
- gallery_recyclerview.adapter = GalleryAdapter(images).apply {
+ reader_recyclerview.adapter = GalleryAdapter(images).apply {
setOnClick {
val attrs = window.attributes
@@ -113,7 +113,7 @@ class GalleryActivity : AppCompatActivity() {
Log.d("Pupil", "Reader Data recieved")
launch(Dispatchers.Main) {
- with(gallery_progressbar) {
+ with(reader_progressbar) {
max = reader.size
progress = 0
@@ -151,14 +151,14 @@ class GalleryActivity : AppCompatActivity() {
launch(Dispatchers.Main) {
images.add(cache)
- gallery_recyclerview.adapter?.notifyItemInserted(images.size - 1)
- gallery_progressbar.progress++
+ reader_recyclerview.adapter?.notifyItemInserted(images.size - 1)
+ reader_progressbar.progress++
}
}
}
launch(Dispatchers.Main) {
- gallery_progressbar.visibility = View.GONE
+ reader_progressbar.visibility = View.GONE
}
}
}
diff --git a/app/src/main/res/layout/activity_gallery.xml b/app/src/main/res/layout/activity_reader.xml
similarity index 77%
rename from app/src/main/res/layout/activity_gallery.xml
rename to app/src/main/res/layout/activity_reader.xml
index 34130f3e..567f5ca7 100644
--- a/app/src/main/res/layout/activity_gallery.xml
+++ b/app/src/main/res/layout/activity_reader.xml
@@ -4,15 +4,15 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
- tools:context=".GalleryActivity">
+ tools:context=".ReaderActivity">
\ No newline at end of file