forked from Archives/Athou_commafeed
fix opml export
This commit is contained in:
@@ -34,9 +34,14 @@ public class OPMLExporter {
|
|||||||
List<FeedCategory> categories = feedCategoryDAO.findAll(user);
|
List<FeedCategory> categories = feedCategoryDAO.findAll(user);
|
||||||
List<FeedSubscription> subscriptions = feedSubscriptionDAO.findAll(user);
|
List<FeedSubscription> subscriptions = feedSubscriptionDAO.findAll(user);
|
||||||
|
|
||||||
|
// export root categories
|
||||||
for (FeedCategory cat : categories) {
|
for (FeedCategory cat : categories) {
|
||||||
opml.getOutlines().add(buildCategoryOutline(cat, subscriptions));
|
if (cat.getParent() == null) {
|
||||||
|
opml.getOutlines().add(buildCategoryOutline(cat, subscriptions));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// export root subscriptions
|
||||||
for (FeedSubscription sub : subscriptions) {
|
for (FeedSubscription sub : subscriptions) {
|
||||||
if (sub.getCategory() == null) {
|
if (sub.getCategory() == null) {
|
||||||
opml.getOutlines().add(buildSubscriptionOutline(sub));
|
opml.getOutlines().add(buildSubscriptionOutline(sub));
|
||||||
|
|||||||
Reference in New Issue
Block a user