Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,9 @@ dependencies {
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.squareup.retrofit2:converter-gson:2.8.2'
//Adding JSON dependencies

//Adding Kotlinx
testImplementation 'org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0'
testImplementation "io.mockk:mockk:1.12.2"
Comment on lines +51 to +53
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an incomplete feature.
Are you using these anywhere? I don't see them used.
If not in use, remove them. Unused code is clutter, and bad documentation, which increases technical debt.
Only complete features, which meet the team's Definition of Done, should be merged to Main/Master.


}
19 changes: 19 additions & 0 deletions app/src/main/java/com/example/mymovieinfo/MainViewModel.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.example.mymovieinfo

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.mymovieinfo.dto.Movie
import com.example.mymovieinfo.service.MovieService
import kotlinx.coroutines.launch

class MainViewModel : ViewModel() {
var movies : MutableLiveData<List<Movie>> = MutableLiveData<List<Movie>>()
var movieService : MovieService = MovieService()
fun fetchCountries() {
viewModelScope.launch {
var innerMovies = movieService.fetchMovies()
movies.postValue(innerMovies)
}
}
}
Comment on lines +1 to +19
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like an incomplete feature.
Are you using these anywhere? I don't see them used.
If not in use, remove them. Unused code is clutter, and bad documentation, which increases technical debt.
Only complete features, which meet the team's Definition of Done, should be merged to Main/Master.