Indention
Cette révision appartient à :
Parent
13954ffe01
révision
4dc5f3e7d9
2 fichiers modifiés avec 8 ajouts et 10 suppressions
|
@ -408,16 +408,16 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
||||||
|
|
||||||
private fun setRotation(rotation: Int) {
|
private fun setRotation(rotation: Int) {
|
||||||
when (rotation) {
|
when (rotation) {
|
||||||
// Rotation free
|
// Rotation free
|
||||||
1 -> requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
1 -> requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED
|
||||||
// Lock in current rotation
|
// Lock in current rotation
|
||||||
2 -> {
|
2 -> {
|
||||||
val currentOrientation = resources.configuration.orientation
|
val currentOrientation = resources.configuration.orientation
|
||||||
setRotation(if (currentOrientation == Configuration.ORIENTATION_PORTRAIT) 3 else 4)
|
setRotation(if (currentOrientation == Configuration.ORIENTATION_PORTRAIT) 3 else 4)
|
||||||
}
|
}
|
||||||
// Lock in portrait
|
// Lock in portrait
|
||||||
3 -> requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT
|
3 -> requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT
|
||||||
// Lock in landscape
|
// Lock in landscape
|
||||||
4 -> requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
|
4 -> requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,13 +383,11 @@ class ReaderPresenter : BasePresenter<ReaderActivity>() {
|
||||||
if (chapter.read) {
|
if (chapter.read) {
|
||||||
val removeAfterReadSlots = prefs.removeAfterReadSlots()
|
val removeAfterReadSlots = prefs.removeAfterReadSlots()
|
||||||
when (removeAfterReadSlots) {
|
when (removeAfterReadSlots) {
|
||||||
// Setting disabled
|
// Setting disabled
|
||||||
-1 -> {
|
-1 -> { /**Empty function**/ }
|
||||||
/**Empty function**/
|
// Remove current read chapter
|
||||||
}
|
|
||||||
// Remove current read chapter
|
|
||||||
0 -> deleteChapter(chapter, manga)
|
0 -> deleteChapter(chapter, manga)
|
||||||
// Remove previous chapter specified by user in settings.
|
// Remove previous chapter specified by user in settings.
|
||||||
else -> getAdjacentChaptersStrategy(chapter, removeAfterReadSlots)
|
else -> getAdjacentChaptersStrategy(chapter, removeAfterReadSlots)
|
||||||
.first?.let { deleteChapter(it, manga) }
|
.first?.let { deleteChapter(it, manga) }
|
||||||
}
|
}
|
||||||
|
|
Référencer dans un nouveau ticket