Small fixes
This commit is contained in:
@@ -204,6 +204,8 @@ class ReaderActivity : AppCompatActivity() {
|
||||
reader_fab_fullscreen.setOnClickListener {
|
||||
isFullscreen = true
|
||||
fullscreen(isFullscreen)
|
||||
|
||||
reader_fab.close(true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,16 +6,14 @@ import android.text.Editable
|
||||
import android.text.TextWatcher
|
||||
import android.view.LayoutInflater
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.WindowManager
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ArrayAdapter
|
||||
import android.widget.LinearLayout
|
||||
import android.widget.TextView
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.preference.Preference
|
||||
import androidx.preference.PreferenceFragmentCompat
|
||||
import kotlinx.android.synthetic.main.dialog_default_query.*
|
||||
import kotlinx.android.synthetic.main.dialog_default_query.view.*
|
||||
import xyz.quaver.pupil.types.Tags
|
||||
import xyz.quaver.pupil.util.Histories
|
||||
@@ -140,7 +138,8 @@ class SettingsActivity : AppCompatActivity() {
|
||||
setOnPreferenceClickListener {
|
||||
val dialogView = LayoutInflater.from(context).inflate(
|
||||
R.layout.dialog_default_query,
|
||||
null
|
||||
LinearLayout(context),
|
||||
false
|
||||
)
|
||||
|
||||
val tags = Tags.parse(
|
||||
@@ -164,6 +163,7 @@ class SettingsActivity : AppCompatActivity() {
|
||||
val tag = languages[tags.first { it.area == "language" }.tag]
|
||||
if (tag != null) {
|
||||
setSelection(
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
(adapter as ArrayAdapter<String>).getPosition(tag)
|
||||
)
|
||||
tags.removeByArea("language")
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import kotlinx.android.synthetic.main.item_reader.view.*
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@@ -23,10 +23,6 @@ class Histories(private val file: File) : ArrayList<Int>() {
|
||||
|
||||
companion object {
|
||||
lateinit var default: Histories
|
||||
|
||||
fun load(file: File) : Histories {
|
||||
return Histories(file).load()
|
||||
}
|
||||
}
|
||||
|
||||
@UseExperimental(ImplicitReflectionSerializer::class)
|
||||
|
||||
Reference in New Issue
Block a user