Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Replace isUpdated property with helper
  • Loading branch information
seadowg committed Nov 26, 2025
commit 17cfc35642a377c8df4f0abcccc9ee2209af0c7e
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class FormsDataService(
projectDependencies.formsRepository,
projectDependencies.formSource
)
val updatedForms = serverForms.filter { it.isUpdated }
val updatedForms = serverForms.filter { it.isUpdated() }
if (updatedForms.isNotEmpty()) {
if (projectDependencies.generalSettings.getBoolean(ProjectKeys.KEY_AUTOMATIC_UPDATE)) {
val results = ServerFormUseCases.downloadForms(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,8 @@ data class ServerFormDetails @JvmOverloads constructor(
}
)

@Deprecated(
message = "Use type instead",
replaceWith = ReplaceWith("type")
)
val isUpdated: Boolean = when (type) {
Type.OnDevice -> false
Type.New -> false
Type.UpdatedVersion -> true
Type.UpdatedHash -> true
Type.UpdatedMedia -> true
fun isUpdated(): Boolean {
return type != Type.OnDevice && type != Type.New
}

companion object {
Expand Down