Uh oh!
There was an error while loading. Please reload this page.
Show shared user - #3320
Conversation
54edd19 to
1bdca81Compare| private String ownerId; | ||
| @Getter | ||
| @Setter | ||
| private String ownerDisplayName; |
There was a problem hiding this comment.
should be formatted as single lines
There was a problem hiding this comment.
Damn Android Studio is always changing this.
I had to do this on a different branch without AndroidStudio… :/
| try { | ||
| return TextDrawable.createAvatar(mAccount.name, mAvatarRadius); | ||
| } catch (NoSuchAlgorithmException e) { | ||
| e.printStackTrace(); |
There was a problem hiding this comment.
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.
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.
| } | ||
| 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.
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.
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.
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.
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(); |
did an initial review of the code, just some minor things / cosmetics :) |
191e12a to
98830b6CompareCodecov 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
9602accCompare9602acc to
2c884ddComparetobiasKaminsky
commented
Feb 27, 2019
2 findbugs increased:
But this is not that lightweight like a string operation. |
2c884dd to
632ea2dComparenextcloud-android-bot
commented
Feb 27, 2019
Lint
FindBugs (new)
FindBugs (master)
|
nextcloud-android-bot
commented
Feb 27, 2019
Lint
FindBugs (new)
FindBugs (master)
|
tobiasKaminsky
commented
Feb 27, 2019
@AndyScherzinger ready for review. |
AndyScherzinger
commented
Feb 27, 2019
I tested it, is the idea here to just show avatars from the user who shared it with me? |
tobiasKaminsky
commented
Feb 27, 2019
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
632ea2d to
bf86cf6CompareAndyScherzinger
commented
Feb 27, 2019
both cases work just fine 👍 |
nextcloud-android-bot
commented
Feb 27, 2019
Lint
FindBugs (new)
FindBugs (master)
|


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