From db2edaaa4eb293c93c4e3487df3adee2c8bd7b8e Mon Sep 17 00:00:00 2001 From: Amanpal Singh <87360222+aman-alfresco@users.noreply.github.com> Date: Tue, 21 Feb 2023 11:45:33 +0530 Subject: [PATCH] Mobileapps 1706 (#134) * Mobileapps 1700 (#217) * fixed sub folder search * added initial as me if logged in user commented in list (#218) --- .../kotlin/com/alfresco/content/data/CommentEntry.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/data/src/main/kotlin/com/alfresco/content/data/CommentEntry.kt b/data/src/main/kotlin/com/alfresco/content/data/CommentEntry.kt index c2d269ab4..25fbb1f53 100644 --- a/data/src/main/kotlin/com/alfresco/content/data/CommentEntry.kt +++ b/data/src/main/kotlin/com/alfresco/content/data/CommentEntry.kt @@ -26,7 +26,7 @@ data class CommentEntry( message = data.message ?: "", created = data.created, userDetails = data.createdBy?.let { UserDetails.with(it) } ?: UserDetails() - ) + ).withAssignData() } /** @@ -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 + } }