Remove some dead code
(cherry picked from commit edd213343b9b524d0cbb05165969b559c24e401c) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt
This commit is contained in:
parent
83e8b670da
commit
324d74f6c3
@ -59,13 +59,6 @@ abstract class HttpSource : CatalogueSource {
|
|||||||
}
|
}
|
||||||
// SY <--
|
// SY <--
|
||||||
|
|
||||||
// /**
|
|
||||||
// * Preferences that a source may need.
|
|
||||||
// */
|
|
||||||
// val preferences: SharedPreferences by lazy {
|
|
||||||
// Injekt.get<Application>().getSharedPreferences(source.getPreferenceKey(), Context.MODE_PRIVATE)
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base url of the website without the trailing slash, like: http://mysite.com
|
* Base url of the website without the trailing slash, like: http://mysite.com
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,6 @@ package eu.kanade.tachiyomi.ui.reader
|
|||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.annotation.TargetApi
|
import android.annotation.TargetApi
|
||||||
import android.app.ActionBar
|
|
||||||
import android.app.ProgressDialog
|
import android.app.ProgressDialog
|
||||||
import android.content.ClipData
|
import android.content.ClipData
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@ -290,7 +289,6 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
readingModeToast?.cancel()
|
readingModeToast?.cancel()
|
||||||
progressDialog?.dismiss()
|
progressDialog?.dismiss()
|
||||||
progressDialog = null
|
progressDialog = null
|
||||||
listeners = mutableListOf()
|
|
||||||
// SY -->
|
// SY -->
|
||||||
autoScrollJob?.cancel()
|
autoScrollJob?.cancel()
|
||||||
autoScrollJob = null
|
autoScrollJob = null
|
||||||
@ -953,23 +951,12 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var listeners: MutableList<ActionBar.OnMenuVisibilityListener> = mutableListOf()
|
|
||||||
|
|
||||||
fun addOnMenuVisibilityListener(listener: ActionBar.OnMenuVisibilityListener) {
|
|
||||||
listeners.add(listener)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun removeOnMenuVisibilityListener(listener: ActionBar.OnMenuVisibilityListener) {
|
|
||||||
listeners.remove(listener)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the visibility of the menu according to [visible] and with an optional parameter to
|
* Sets the visibility of the menu according to [visible] and with an optional parameter to
|
||||||
* [animate] the views.
|
* [animate] the views.
|
||||||
*/
|
*/
|
||||||
fun setMenuVisibility(visible: Boolean, animate: Boolean = true) {
|
fun setMenuVisibility(visible: Boolean, animate: Boolean = true) {
|
||||||
menuVisible = visible
|
menuVisible = visible
|
||||||
listeners.forEach { listener -> listener.onMenuVisibilityChanged(visible) }
|
|
||||||
if (visible) {
|
if (visible) {
|
||||||
windowInsetsController.show(WindowInsetsCompat.Type.systemBars())
|
windowInsetsController.show(WindowInsetsCompat.Type.systemBars())
|
||||||
binding.readerMenu.isVisible = true
|
binding.readerMenu.isVisible = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user