Skip to content

Commit e73a828

Browse files
committed
fix accountOwnsFile
Signed-off-by: alperozturk <alper_ozturk@proton.me>
1 parent a917300 commit e73a828

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

app/src/main/java/it/niedermann/owncloud/notes/share/NoteShareActivity.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,9 @@ private void navigateNoteShareDetail(String shareWith, int shareType) {
234234
startActivity(intent);
235235
}
236236

237-
// TODO: Check if note.getAccountId() return note's owner's id
238237
private boolean accountOwnsFile() {
239-
String noteId = String.valueOf(note.getAccountId());
240-
return TextUtils.isEmpty(noteId) || account.getAccountName().split("@")[0].equalsIgnoreCase(noteId);
238+
String displayName = account.getDisplayName();
239+
return TextUtils.isEmpty(displayName) || account.getAccountName().split("@")[0].equalsIgnoreCase(displayName);
241240
}
242241

243242
private void setShareWithYou() {

0 commit comments

Comments
 (0)