diff options
author | Andy Scherzinger <info@andy-scherzinger.de> | 2019-03-13 00:14:26 +0300 |
---|---|---|
committer | Andy Scherzinger <info@andy-scherzinger.de> | 2019-03-13 00:14:26 +0300 |
commit | b922a24d0cdde78c9d92cea0f149dd628c756460 (patch) | |
tree | 3c9c2b1d9edcef6dd2faf3047f78f5a725f0159b | |
parent | b711018a481eeb2cc6dcb6a91d532190075f66e3 (diff) |
housekeeping
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardDetailsFragment.java | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardDetailsFragment.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardDetailsFragment.java index 087dfe59a..8d72489f6 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardDetailsFragment.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/card/CardDetailsFragment.java @@ -127,6 +127,9 @@ public class CardDetailsFragment extends Fragment implements DatePickerDialog.On avatarSize = SupportUtil.getAvatarDimension(getContext()); avatarLayoutParams = new LinearLayout.LayoutParams(avatarSize, avatarSize); avatarLayoutParams.setMargins(0, 0, SupportUtil.dpToPx(getContext(), 8), 0); + + // TODO FIX: NullPointerException! + // syncManager.getServerUrl() SingleSignOnAccount account = null; try { account = SingleAccountHelper.getCurrentSingleSignOnAccount(getContext()); @@ -250,32 +253,18 @@ public class CardDetailsFragment extends Fragment implements DatePickerDialog.On people.setOnItemClickListener((adapterView, view, position, id) -> { User user = (User) adapterView.getItemAtPosition(position); // TODO: store chosen user - if(baseUrl != null) { + if (baseUrl != null) { addAvatar(baseUrl, user); } people.setText(user.getDisplayname()); }); - // TODO implement proper people display + avatar fetching - // TODO find out how to get the server's Nextcloud URL to build the avatar URL if (this.card.getAssignedUsers() != null) { - try { - // TODO FIX: NullPointerException! - // syncManager.getServerUrl() - - //Workaround - SingleSignOnAccount account = SingleAccountHelper.getCurrentSingleSignOnAccount(getContext()); - String baseUrl = account.url; - peopleList.removeAllViews(); - if(baseUrl != null) { - for (User user : this.card.getAssignedUsers()) { - addAvatar(baseUrl, user); - } + peopleList.removeAllViews(); + if (baseUrl != null) { + for (User user : this.card.getAssignedUsers()) { + addAvatar(baseUrl, user); } - } catch (NextcloudFilesAppAccountNotFoundException e) { - DeckLog.logError(e); - } catch (NoCurrentAccountSelectedException e) { - DeckLog.logError(e); } } } |