diff options
author | ByteHamster <ByteHamster@users.noreply.github.com> | 2021-02-04 13:01:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 13:01:37 +0100 |
commit | 0e33daa74dd96bb202ae83ecd9eff7529f2acc87 (patch) | |
tree | b7afec1d4bd257b1ffce9a883064dd9e581241a1 | |
parent | 4af0f98d2fb3c2e8da8668b3f570ce49194109c3 (diff) | |
parent | 931bda4bedac1540c9bf3f78cd2b8dd897edf52d (diff) | |
download | AntennaPod-0e33daa74dd96bb202ae83ecd9eff7529f2acc87.zip |
Merge pull request #4922 from ByteHamster/fix-null-local-folder-title
Fixed local folder name being set to null
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java index 28456c01e..09dfac37a 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/AddFeedFragment.java @@ -190,7 +190,11 @@ public class AddFeedFragment extends Fragment { if (documentFile == null) { throw new IllegalArgumentException("Unable to retrieve document tree"); } - Feed dirFeed = new Feed(Feed.PREFIX_LOCAL_FOLDER + uri.toString(), null, documentFile.getName()); + String title = documentFile.getName(); + if (title == null) { + title = getString(R.string.local_folder); + } + Feed dirFeed = new Feed(Feed.PREFIX_LOCAL_FOLDER + uri.toString(), null, title); dirFeed.setItems(Collections.emptyList()); dirFeed.setSortOrder(SortOrder.EPISODE_TITLE_A_Z); Feed fromDatabase = DBTasks.updateFeed(getContext(), dirFeed, false); |