Skip to content

Commit

Permalink
🐛 fix API issue
Browse files Browse the repository at this point in the history
  • Loading branch information
theapache64 committed Jun 9, 2021
1 parent 0d82b93 commit f95dbaf
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId "com.theapache64.topcorn2"
minSdkVersion 21
targetSdkVersion 30
versionCode 10002
versionName "1.0.0-alpha02"
versionCode 10003
versionName "1.0.0-alpha03"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import androidx.room.TypeConverters
import com.theapache64.topcorn2.data.local.daos.MoviesDao
import com.theapache64.topcorn2.data.remote.Movie

@Database(entities = [Movie::class], version = 2)
@Database(entities = [Movie::class], version = 3)
@TypeConverters(Converters::class)
abstract class AppDatabase : RoomDatabase() {
abstract fun movieDao(): MoviesDao
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ data class Movie(
@Json(name = "rating")
val rating: Float, // 8.2
@Json(name = "year")
val year: Int
val year: Int?
) : Serializable {
@PrimaryKey(autoGenerate = true)
@ColumnInfo(name = "id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class MoviesViewModel @ViewModelInject constructor(
.sortedByDescending {
when (sortOrder) {
SORT_ORDER_RATING -> it.rating
SORT_ORDER_YEAR -> it.year.toFloat()
SORT_ORDER_YEAR -> it.year?.toFloat()
else -> {
throw IllegalArgumentException("TSH : sort order '$sortOrder' not managed")
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0-alpha04'
classpath 'com.android.tools.build:gradle:7.0.0-beta03'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jan 03 20:12:08 IST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-rc-1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME

0 comments on commit f95dbaf

Please sign in to comment.