mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 21:13:24 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
c516078531
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
* text=auto
|
||||||
|
* text eol=lf
|
@ -74,4 +74,4 @@ open class SourceManager(private val context: Context) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SourceNotFoundException(message: String, val id: Long) : Exception(message)
|
class SourceNotFoundException(message: String, val id: Long) : Exception(message)
|
||||||
|
@ -23,7 +23,6 @@ interface SManga : Serializable {
|
|||||||
var initialized: Boolean
|
var initialized: Boolean
|
||||||
|
|
||||||
fun copyFrom(other: SManga) {
|
fun copyFrom(other: SManga) {
|
||||||
|
|
||||||
if (other.author != null)
|
if (other.author != null)
|
||||||
author = other.author
|
author = other.author
|
||||||
|
|
||||||
|
@ -496,8 +496,12 @@ class ChaptersController() : NucleusController<ChaptersPresenter>(),
|
|||||||
presenter.deleteChapters(chapters)
|
presenter.deleteChapters(chapters)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onChaptersDeleted() {
|
fun onChaptersDeleted(chapters: List<ChapterItem>) {
|
||||||
dismissDeletingDialog()
|
dismissDeletingDialog()
|
||||||
|
//this is needed so the downloaded text gets removed from the item
|
||||||
|
chapters.forEach {
|
||||||
|
adapter?.updateItem(it)
|
||||||
|
}
|
||||||
adapter?.notifyDataSetChanged()
|
adapter?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ class ChaptersPresenter(
|
|||||||
*/
|
*/
|
||||||
fun getNextUnreadChapter(): ChapterItem? {
|
fun getNextUnreadChapter(): ChapterItem? {
|
||||||
return chapters.sortedByDescending { it.source_order }.find { !it.read }
|
return chapters.sortedByDescending { it.source_order }.find { !it.read }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark the selected chapter list as read/unread.
|
* Mark the selected chapter list as read/unread.
|
||||||
@ -278,7 +278,7 @@ class ChaptersPresenter(
|
|||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribeFirst({ view, _ ->
|
.subscribeFirst({ view, _ ->
|
||||||
view.onChaptersDeleted()
|
view.onChaptersDeleted(chapters)
|
||||||
}, ChaptersController::onChaptersDeletedError)
|
}, ChaptersController::onChaptersDeletedError)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import android.view.ViewGroup
|
|||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.util.inflate
|
import eu.kanade.tachiyomi.util.inflate
|
||||||
|
|
||||||
class TrackAdapter(controller: TrackController) : androidx.recyclerview.widget.RecyclerView.Adapter<TrackHolder>() {
|
class TrackAdapter(controller: TrackController) : RecyclerView.Adapter<TrackHolder>() {
|
||||||
|
|
||||||
var items = emptyList<TrackItem>()
|
var items = emptyList<TrackItem>()
|
||||||
set(value) {
|
set(value) {
|
||||||
|
Loading…
Reference in New Issue
Block a user