diff options
3 files changed, 13 insertions, 14 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java index c805a0abd..761d6246e 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java @@ -208,10 +208,6 @@ public class ImportExportPreferencesFragment extends PreferenceFragmentCompat { builder.show(); } - private void importFavorites() { - // TODO implement - } - private void showDatabaseImportSuccessDialog() { AlertDialog.Builder d = new AlertDialog.Builder(getContext()); d.setMessage(R.string.import_ok); diff --git a/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java b/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java index a6686a8a4..39e968ce9 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java +++ b/core/src/main/java/de/danoeh/antennapod/core/export/favorites/FavoritesWriter.java @@ -35,7 +35,7 @@ public class FavoritesWriter implements ExportWriter { String template = IOUtils.toString(templateStream, "UTF-8"); String[] templateParts = template.split("\\{FAVORITES\\}"); - Map<Long, List<FeedItem>> favoriteByFeed = getFeedMap(getFavorites(feeds)); + Map<Long, List<FeedItem>> favoriteByFeed = getFeedMap(getFavorites()); writer.append(templateParts[0]); writer.append("<ul>"); @@ -60,7 +60,7 @@ public class FavoritesWriter implements ExportWriter { Log.d(TAG, "Finished writing document"); } - private List<FeedItem> getFavorites(List<Feed> feeds) { + private List<FeedItem> getFavorites() { int page = 0; List<FeedItem> favoritesPage = DBReader.getFavoriteItemsList(page, PAGE_LIMIT); @@ -79,7 +79,8 @@ public class FavoritesWriter implements ExportWriter { favoritesPage = DBReader.getFavoriteItemsList(page * PAGE_LIMIT, PAGE_LIMIT); } - Collections.sort(favoritesList, (lhs, rhs) -> lhs.getPubDate().compareTo(rhs.getPubDate())); + // sort in descending order + Collections.sort(favoritesList, (lhs, rhs) -> rhs.getPubDate().compareTo(lhs.getPubDate())); return favoritesList; } @@ -114,14 +115,13 @@ public class FavoritesWriter implements ExportWriter { } private void writeFavoriteItem(Writer writer, FeedItem item) throws IOException { - writer.append("<li><span>["); - writer.append(DATE_FORMAT.format(item.getPubDate())); - writer.append("] <a href=\""); - writer.append(item.getLink()); - writer.append("\">"); + writer.append("<li><span>"); writer.append(item.getTitle().trim()); - writer.append("</a>"); - writer.append("</span></li>\n"); + writer.append("<br>\n[<a href=\""); + writer.append(item.getLink()); + writer.append("\">Website</a>] • [<a href=\""); + writer.append(item.getMedia().getDownload_url()); + writer.append("\">Media</a>]</span></li>\n"); } @Override diff --git a/core/src/main/res/values-iw-rIL/strings.xml b/core/src/main/res/values-iw-rIL/strings.xml index cdd31c600..d20a388bc 100644 --- a/core/src/main/res/values-iw-rIL/strings.xml +++ b/core/src/main/res/values-iw-rIL/strings.xml @@ -556,6 +556,9 @@ <string name="import_select_file">בחירת קובץ לייבוא</string> <string name="import_ok">הייבוא הצליח.\n\nנא ללחוץ על אישור כדי להפעיל את אנטנה־פּוֹד מחדש</string> <string name="import_no_downgrade">מסד נתונים זה ייוצא עם גרסה עדכנית יותר של אנטנה־פוֹד</string> + <string name="favorites">מועדפים</string> + <string name="favorites_export_label">ייצוא מועדפים</string> + <string name="favorites_export_summary">ייצוא פרקים מועדפים לקובץ</string> <!--Sleep timer--> <string name="set_sleeptimer_label">הגדרת מתזמן שינה</string> <string name="disable_sleeptimer_label">השבתת מתזמן שינה</string> |