Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hide personal circle from the sharedWithMe #27633

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
32 changes: 22 additions & 10 deletions apps/files_sharing/src/utils/SharedWithMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,28 @@ const shareWithTitle = function(share) {
{ escape: false }
)
} else if (share.type === OC.Share.SHARE_TYPE_CIRCLE) {
return t(
'files_sharing',
'Shared with you and {circle} by {owner}',
{
circle: share.shareWithDisplayName,
owner: share.ownerDisplayName,
},
undefined,
{ escape: false }
)
if (share.shareWithDisplayName === ' ') {
Copy link
Member

@blizzz blizzz Jun 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a single whitespace?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup, as said if I return an empty string, the ID of the Circle/Share will be used as displayName. single whitespace is a quick workaround

return t(
'files_sharing',
'Shared with you by {owner}',
{
owner: share.ownerDisplayName,
},
undefined,
{ escape: false }
)
} else {
return t(
'files_sharing',
'Shared with you and {circle} by {owner}',
{
circle: share.shareWithDisplayName,
owner: share.ownerDisplayName,
},
undefined,
{ escape: false }
)
}
} else if (share.type === OC.Share.SHARE_TYPE_ROOM) {
if (share.shareWithDisplayName) {
return t(
Expand Down