pull/32/head
GKF 6 years ago
parent d4c2ce68e4
commit 444c46f5cc
  1. 2
      app/src/main/java/io/legado/app/data/dao/BookGroupDao.kt
  2. 5
      app/src/main/java/io/legado/app/data/entities/BookGroup.kt
  3. 9
      app/src/main/res/menu/book_source.xml

@ -1,9 +1,11 @@
package io.legado.app.data.dao package io.legado.app.data.dao
import androidx.paging.DataSource import androidx.paging.DataSource
import androidx.room.Dao
import androidx.room.Query import androidx.room.Query
import io.legado.app.data.entities.BookGroup import io.legado.app.data.entities.BookGroup
@Dao
interface BookGroupDao { interface BookGroupDao {
@Query("SELECT * FROM book_groups ORDER BY `order`") @Query("SELECT * FROM book_groups ORDER BY `order`")

@ -1,12 +1,15 @@
package io.legado.app.data.entities package io.legado.app.data.entities
import android.os.Parcelable
import androidx.room.Entity import androidx.room.Entity
import androidx.room.PrimaryKey import androidx.room.PrimaryKey
import kotlinx.android.parcel.Parcelize
@Parcelize
@Entity(tableName = "book_groups") @Entity(tableName = "book_groups")
data class BookGroup( data class BookGroup(
@PrimaryKey @PrimaryKey
var groupId: Int = 0, var groupId: Int = 0,
var groupName: String, var groupName: String,
var order: Int = 0 var order: Int = 0
) ) : Parcelable

@ -27,11 +27,10 @@
</item> </item>
<item <item
android:id="@+id/action_sort" android:id="@+id/action_sort"
android:icon="@drawable/ic_format_line_spacing" android:icon="@drawable/ic_format_line_spacing"
android:title="@string/sort" android:title="@string/sort"
app:showAsAction="always" app:showAsAction="never">
tools:ignore="AlwaysShowAction">
<menu> <menu>

Loading…
Cancel
Save