Skip to content

Commit

Permalink
Mobileapps 1706 (#134)
Browse files Browse the repository at this point in the history
* Mobileapps 1700 (#217)

* fixed sub folder search

* added initial as me if logged in user commented in list (#218)
  • Loading branch information
aman-alfresco authored Feb 21, 2023
1 parent e51b45c commit db2edaa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion data/src/main/kotlin/com/alfresco/content/data/CommentEntry.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data class CommentEntry(
message = data.message ?: "",
created = data.created,
userDetails = data.createdBy?.let { UserDetails.with(it) } ?: UserDetails()
)
).withAssignData()
}

/**
Expand All @@ -40,4 +40,13 @@ data class CommentEntry(
)
}
}

private fun withAssignData(): CommentEntry {
val apsUser = TaskRepository().getAPSUser()
return if (apsUser.id == this.userDetails?.id) {
copy(
userDetails = this.userDetails.let { UserDetails.with(it) }
)
} else this
}
}

0 comments on commit db2edaa

Please sign in to comment.