From dec9b5bf1e5828d505e3092989ab1ae05e4dd5fc Mon Sep 17 00:00:00 2001 From: James Allen Date: Tue, 17 Jan 2017 15:10:44 +0100 Subject: [PATCH] Use email if name is blank --- .../review-panel/controllers/ReviewPanelController.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee index 675c8644ec..91792255de 100644 --- a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee +++ b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee @@ -415,6 +415,8 @@ define [ thread.resolved_by_user = formatUser(thread.resolved_by_user) $scope.reviewPanel.resolvedThreadIds[thread_id] = true $scope.reviewPanel.commentThreads = threads + $timeout () -> + $scope.$broadcast "review-panel:layout" formatComment = (comment) -> comment.user = formatUser(comment.user) @@ -436,9 +438,9 @@ define [ name = "You" isSelf = true else - name = [user.first_name, user.last_name].filter((n) -> n?).join(" ") + name = [user.first_name, user.last_name].filter((n) -> n? and n != "").join(" ") if name == "" - name = "Unknown" + name = user.email?.split("@")[0] or "Unknown" isSelf = false return { id: id