Skip to content

Commit f95dbaf

Browse files
committed
🐛 fix API issue
1 parent 0d82b93 commit f95dbaf

File tree

9 files changed

+10
-8
lines changed

9 files changed

+10
-8
lines changed

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ android {
1414
applicationId "com.theapache64.topcorn2"
1515
minSdkVersion 21
1616
targetSdkVersion 30
17-
versionCode 10002
18-
versionName "1.0.0-alpha02"
17+
versionCode 10003
18+
versionName "1.0.0-alpha03"
1919

2020
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2121
}

app/src/main/java/com/theapache64/topcorn2/data/local/AppDatabase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import androidx.room.TypeConverters
66
import com.theapache64.topcorn2.data.local.daos.MoviesDao
77
import com.theapache64.topcorn2.data.remote.Movie
88

9-
@Database(entities = [Movie::class], version = 2)
9+
@Database(entities = [Movie::class], version = 3)
1010
@TypeConverters(Converters::class)
1111
abstract class AppDatabase : RoomDatabase() {
1212
abstract fun movieDao(): MoviesDao

app/src/main/java/com/theapache64/topcorn2/data/remote/Movie.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ data class Movie(
3535
@Json(name = "rating")
3636
val rating: Float, // 8.2
3737
@Json(name = "year")
38-
val year: Int
38+
val year: Int?
3939
) : Serializable {
4040
@PrimaryKey(autoGenerate = true)
4141
@ColumnInfo(name = "id")

app/src/main/java/com/theapache64/topcorn2/ui/screen/movies/MoviesViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class MoviesViewModel @ViewModelInject constructor(
5555
.sortedByDescending {
5656
when (sortOrder) {
5757
SORT_ORDER_RATING -> it.rating
58-
SORT_ORDER_YEAR -> it.year.toFloat()
58+
SORT_ORDER_YEAR -> it.year?.toFloat()
5959
else -> {
6060
throw IllegalArgumentException("TSH : sort order '$sortOrder' not managed")
6161
}

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
jcenter()
1111
}
1212
dependencies {
13-
classpath 'com.android.tools.build:gradle:7.0.0-alpha04'
13+
classpath 'com.android.tools.build:gradle:7.0.0-beta03'
1414
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1515
classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version"
1616
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Sun Jan 03 20:12:08 IST 2021
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-rc-1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)