diff --git a/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt b/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt index 4c4d4c727..b348cfeaa 100644 --- a/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt +++ b/app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt @@ -1,9 +1,11 @@ package io.legado.app.data.dao import androidx.paging.DataSource +import androidx.room.Dao import androidx.room.Query import io.legado.app.data.entities.BookGroup +@Dao interface BookGroupDao { @Query("SELECT * FROM book_groups ORDER BY `order`") diff --git a/app/src/main/java/io/legado/app/data/entities/BookGroup.kt b/app/src/main/java/io/legado/app/data/entities/BookGroup.kt index dcd02a49f..5b3bb0992 100644 --- a/app/src/main/java/io/legado/app/data/entities/BookGroup.kt +++ b/app/src/main/java/io/legado/app/data/entities/BookGroup.kt @@ -1,12 +1,15 @@ package io.legado.app.data.entities +import android.os.Parcelable import androidx.room.Entity import androidx.room.PrimaryKey +import kotlinx.android.parcel.Parcelize +@Parcelize @Entity(tableName = "book_groups") data class BookGroup( @PrimaryKey var groupId: Int = 0, var groupName: String, var order: Int = 0 -) \ No newline at end of file +) : Parcelable \ No newline at end of file diff --git a/app/src/main/res/menu/book_source.xml b/app/src/main/res/menu/book_source.xml index f02d01aa7..f5fe9609c 100644 --- a/app/src/main/res/menu/book_source.xml +++ b/app/src/main/res/menu/book_source.xml @@ -27,11 +27,10 @@ + android:id="@+id/action_sort" + android:icon="@drawable/ic_format_line_spacing" + android:title="@string/sort" + app:showAsAction="never">