-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Show shared user #3320
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
Show shared user #3320
Conversation
54edd19 to
1bdca81
Compare
| private String ownerId; | ||
| @Getter | ||
| @Setter | ||
| private String ownerDisplayName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be formatted as single lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn Android Studio is always changing this.
I had to do this on a different branch without AndroidStudio… :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see #3325 for this
| try { | ||
| return TextDrawable.createAvatar(mAccount.name, mAvatarRadius); | ||
| } catch (NoSuchAlgorithmException e) { | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be a proper log statement
| if (holder instanceof OCFileListItemViewHolder) { | ||
| OCFileListItemViewHolder itemViewHolder = (OCFileListItemViewHolder) holder; | ||
|
|
||
| if (!TextUtils.isEmpty(file.getOwnerId()) && !mAccount.name.split("@")[0].equals(file.getOwnerId())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably move the split method based on the "@" into a utils class (not sure if we already have one for account/name things since I believe we do splitting based on the @ sign already in some other places so we should centralize that part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| } | ||
| sharedIconView.setOnClickListener(view -> ocFileListFragmentInterface.onShareIconClick(file)); | ||
|
|
||
| if (!TextUtils.isEmpty(file.getOwnerId()) && !mAccount.name.split("@")[0].equals(file.getOwnerId())) { // TODO refactor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment abpve regarding handdling of @
|
|
||
| @Override | ||
| public boolean shouldCallGeneratedCallback(String tag, Object callContext) { | ||
| // return ((ImageView) callContext).getTag().equals(tag); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove commented out code in case we alsways return false
| fileSize = itemView.findViewById(R.id.file_size); | ||
| lastModification = itemView.findViewById(R.id.last_mod); | ||
| overflowMenu = itemView.findViewById(R.id.overflow_menu); | ||
| sharedAvatar = itemView.findViewById(R.id.sharedAvatar); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should replace this with butterknife :)
| } | ||
|
|
||
| private void setShareWithYou() { | ||
| if (!TextUtils.isEmpty(file.getOwnerId()) && !account.name.split("@")[0].equals(file.getOwnerId())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment about creation of a split @ method
|
|
||
| private static final String ARG_FILE = "FILE"; | ||
| private static final String ARG_ACCOUNT = "ACCOUNT"; | ||
| private static final String TAG = FileDetailSharingFragment.class.getSimpleName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TAG isn't used atm
|
did an initial review of the code, just some minor things / cosmetics :) |
191e12a to
98830b6
Compare
Codecov Report
@@ Coverage Diff @@
## master #3320 +/- ##
===========================================
+ Coverage 6% 6.18% +0.17%
Complexity 1 1
===========================================
Files 318 317 -1
Lines 31024 30575 -449
Branches 4447 4394 -53
===========================================
+ Hits 1863 1890 +27
+ Misses 28884 28400 -484
- Partials 277 285 +8
|
Codecov Report
@@ Coverage Diff @@
## master #3320 +/- ##
===========================================
- Coverage 6% 6% -0.01%
Complexity 1 1
===========================================
Files 318 318
Lines 31008 31077 +69
Branches 4448 4455 +7
===========================================
+ Hits 1862 1866 +4
- Misses 28869 28934 +65
Partials 277 277
|
98830b6 to
9602acc
Compare
9602acc to
2c884dd
Compare
|
2 findbugs increased:
But this is not that lightweight like a string operation. |
2c884dd to
632ea2d
Compare
Lint
FindBugs (new)
FindBugs (master)
|
Lint
FindBugs (new)
FindBugs (master)
|
|
@AndyScherzinger ready for review. |
I tested it, is the idea here to just show avatars from the user who shared it with me? |
Signed-off-by: tobiasKaminsky <[email protected]>
632ea2d to
bf86cf6
Compare
|
both cases work just fine 👍 |
Lint
FindBugs (new)
FindBugs (master)
|


Shows shared users on file list.
Needs feedback from nextcloud/server#12874