MutableUserReadingData

class MutableUserReadingData(id: String, lastReadTime: LocalDateTime, totalReadTime: Int, readingProgress: Float, lastReadChapterId: String, lastReadChapterTitle: String, currentChapterReadingProgressMap: Map<String, Float>, maxChapterReadingProgressMap: Map<String, Float>) : UserReadingData

可变的用户书本阅读数据对象 其中每一个成员都是可被UI观测的

Since

Api 2

Parameters

id

书本id

lastReadTime

最后阅读时间

totalReadTime

总阅读时长(单位: 秒), -1表示尚未阅读

readingProgress

书本整体阅读进度(0.0~1.0)

lastReadChapterId

最后阅读的章节id

lastReadChapterTitle

最后阅读的章节标题

currentChapterReadingProgressMap

各章节的当前阅读进度Map, 以章节id为key

maxChapterReadingProgressMap

各章节的历史最高阅读进度Map, 以章节id为key

Constructors

Link copied to clipboard
constructor(id: String, lastReadTime: LocalDateTime, totalReadTime: Int, readingProgress: Float, lastReadChapterId: String, lastReadChapterTitle: String, currentChapterReadingProgressMap: Map<String, Float>, maxChapterReadingProgressMap: Map<String, Float>)

返回可变用户阅读数据对象

Types

Link copied to clipboard
object Companion

可变用户阅读数据工厂方法集合

Properties

Link copied to clipboard

各章节的当前阅读进度Map, 以章节id为key

Link copied to clipboard
open override var id: String

书本id

Link copied to clipboard
open override var lastReadChapterId: String

最后阅读的章节id

Link copied to clipboard
open override var lastReadChapterTitle: String

最后阅读的章节标题

Link copied to clipboard
open override var lastReadTime: LocalDateTime

最后阅读时间

Link copied to clipboard

各章节的历史最高阅读进度Map, 以章节id为key

Link copied to clipboard
open override var readingProgress: Float

书本整体阅读进度(0.0~1.0)

Link copied to clipboard
open override var totalReadTime: Int

总阅读时长(单位: 秒), -1表示尚未阅读

Functions

Link copied to clipboard
fun update(userReadingData: UserReadingData)

用另一个用户阅读数据对象的数据更新自身

Link copied to clipboard
fun updateChapterReadingProgress(chapterId: String, progress: Float)

更新指定章节的阅读进度并同时更新历史最高阅读进度