mirror of
https://github.com/michaldrabik/showly.git
synced 2025-08-24 10:04:19 +08:00
Statistics ratings fix
(cherry picked from commit 73f5ddf6def9852efe5ad5d860b8bb9779b444ac)
This commit is contained in:
@ -11,13 +11,13 @@ interface RatingsDao :
|
||||
BaseDao<Rating>,
|
||||
RatingsLocalDataSource {
|
||||
|
||||
@Query("SELECT * FROM ratings")
|
||||
@Query("SELECT * FROM ratings ORDER BY rated_at DESC")
|
||||
override suspend fun getAll(): List<Rating>
|
||||
|
||||
@Query("SELECT * FROM ratings WHERE type == :type")
|
||||
@Query("SELECT * FROM ratings WHERE type == :type ORDER BY rated_at DESC")
|
||||
override suspend fun getAllByType(type: String): List<Rating>
|
||||
|
||||
@Query("SELECT * FROM ratings WHERE id_trakt IN (:idsTrakt) AND type == :type")
|
||||
@Query("SELECT * FROM ratings WHERE id_trakt IN (:idsTrakt) AND type == :type ORDER BY rated_at DESC")
|
||||
override suspend fun getAllByType(
|
||||
idsTrakt: List<Long>,
|
||||
type: String,
|
||||
|
@ -49,7 +49,7 @@ class StatisticsMoviesFragment : BaseFragment<StatisticsMoviesViewModel>(R.layou
|
||||
|
||||
private fun setupView() {
|
||||
with(binding) {
|
||||
statisticsMoviesToolbar.setNavigationOnClickListener { activity?.onBackPressed() }
|
||||
statisticsMoviesToolbar.setOnClickListener { activity?.onBackPressed() }
|
||||
statisticsMoviesRatings.onMovieClickListener = {
|
||||
openMovieDetails(it.movie.traktId)
|
||||
}
|
||||
|
@ -29,7 +29,6 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?android:windowBackground"
|
||||
android:elevation="@dimen/elevationNormal"
|
||||
app:contentInsetStartWithNavigation="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/statisticsTotalTimeSpent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
Reference in New Issue
Block a user