From 4d7f38a0f71285ea039e950205a409a8d0be783f Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 28 Jan 2024 10:59:28 +0900 Subject: [PATCH] =?UTF-8?q?PublicPath=E3=81=AE=E7=94=9F=E6=88=90=E3=83=AD?= =?UTF-8?q?=E3=82=B8=E3=83=83=E3=82=AF=E3=82=92=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/picker/base/LacertaFilePickerDialogBase.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java b/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java index 2fedd677..1ca073dd 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/picker/base/LacertaFilePickerDialogBase.java @@ -7,6 +7,7 @@ import androidx.fragment.app.DialogFragment; import javax.inject.Inject; import one.nem.lacerta.model.LibraryItemPage; +import one.nem.lacerta.model.ListItemType; import one.nem.lacerta.model.PublicPath; import one.nem.lacerta.utils.LacertaLogger; @@ -43,11 +44,15 @@ public class LacertaFilePickerDialogBase extends DialogFragment { // Methods - protected void updatePathTextView(TextView currentDirTextView, PublicPath publicPath) { + protected void updatePathTextView(TextView currentDirTextView, PublicPath publicPath, ListItemType listItemType) { if (publicPath == null) { currentDirTextView.setText("/"); } else { - currentDirTextView.setText("/" + publicPath.parent().getStringPath()); // TODO-rca: PublicPath側の実装を治すべき + if (listItemType == ListItemType.ITEM_TYPE_FOLDER) { + currentDirTextView.setText("/" + publicPath.getStringPath()); // TODO-rca: PublicPath側の実装を治すべき + } else { + currentDirTextView.setText("/" + publicPath.parent().getStringPath()); // TODO-rca: PublicPath側の実装を治すべき + } } } protected void updateListView(LacertaFilePickerAdapterBase adapter, LibraryItemPage libraryItemPage, int currentCount, String currentDirId) {