Skip to content

Commit

Permalink
feat(models): remove secondary constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
stantanasi committed Mar 26, 2024
1 parent c54c0d9 commit 601d3b7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 16 deletions.
6 changes: 2 additions & 4 deletions app/src/main/java/com/tanasi/streamflix/models/Episode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import java.util.Calendar
@Entity("episodes")
class Episode(
@PrimaryKey
var id: String,
var number: Int,
var id: String = "",
var number: Int = 0,
var title: String? = null,
released: String? = null,
var poster: String? = null,
Expand All @@ -22,8 +22,6 @@ class Episode(
var season: Season? = null,
) : WatchItem, AppAdapter.Item {

constructor() : this("", 0)

var released = released?.toCalendar()
override var isWatched: Boolean = false
override var watchedDate: Calendar? = null
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/java/com/tanasi/streamflix/models/Movie.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import java.util.Calendar
@Entity("movies")
class Movie(
@PrimaryKey
var id: String,
var title: String,
var id: String = "",
var title: String = "",
var overview: String? = null,
released: String? = null,
var runtime: Int? = null,
Expand All @@ -33,8 +33,6 @@ class Movie(
val recommendations: List<Show> = listOf(),
) : Show, WatchItem, AppAdapter.Item {

constructor() : this("", "")

var released = released?.toCalendar()
override var isFavorite: Boolean = false
override var isWatched: Boolean = false
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/java/com/tanasi/streamflix/models/Season.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import com.tanasi.streamflix.adapters.AppAdapter
@Entity("seasons")
class Season(
@PrimaryKey
var id: String,
var number: Int,
var id: String = "",
var number: Int = 0,
var title: String? = null,
var poster: String? = null,

Expand All @@ -18,8 +18,6 @@ class Season(
var episodes: List<Episode> = listOf(),
) : AppAdapter.Item {

constructor() : this("", 0)


@Ignore
override lateinit var itemType: AppAdapter.Type
Expand Down
6 changes: 2 additions & 4 deletions app/src/main/java/com/tanasi/streamflix/models/TvShow.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import com.tanasi.streamflix.utils.toCalendar
@Entity("tv_shows")
class TvShow(
@PrimaryKey
var id: String,
var title: String,
var id: String = "",
var title: String = "",
var overview: String? = null,
released: String? = null,
var runtime: Int? = null,
Expand All @@ -33,8 +33,6 @@ class TvShow(
val recommendations: List<Show> = listOf(),
) : Show, AppAdapter.Item {

constructor() : this("", "")

var released = released?.toCalendar()
override var isFavorite: Boolean = false

Expand Down

0 comments on commit 601d3b7

Please sign in to comment.