pull/32/head
kunfei 5 years ago
parent 67cd13b185
commit 9a6d5e06ef
  1. 2
      app/src/main/java/io/legado/app/data/AppDatabase.kt
  2. 21
      app/src/main/java/io/legado/app/data/entities/Bookmark.kt
  3. 2
      app/src/main/java/io/legado/app/ui/chapterlist/BookmarkAdapter.kt
  4. 2
      app/src/main/java/io/legado/app/ui/chapterlist/ChapterListAdapter.kt
  5. 7
      app/src/main/res/layout/item_bookmark.xml
  6. 7
      app/src/main/res/layout/item_chapter_list.xml

@ -12,7 +12,7 @@ import io.legado.app.data.entities.*
@Database(
entities = [Book::class, BookGroup::class, BookSource::class, BookChapter::class, ReplaceRule::class, SearchBook::class,
SearchKeyword::class, SourceCookie::class, RssSource::class],
SearchKeyword::class, SourceCookie::class, RssSource::class, Bookmark::class],
version = 1,
exportSchema = true
)

@ -0,0 +1,21 @@
package io.legado.app.data.entities
import android.os.Parcelable
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import kotlinx.android.parcel.Parcelize
@Parcelize
@Entity(tableName = "bookmarks", indices = [(Index(value = ["bookUrl"], unique = true))])
data class Bookmark(
@PrimaryKey
var time: Long = System.currentTimeMillis(),
var bookUrl: String = "",
var bookName: String = "",
var chapterName: String = "",
var chapterIndex: Int = 0,
var pageIndex: Int = 0,
var content: String = ""
) : Parcelable

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
</LinearLayout>
Loading…
Cancel
Save