mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
preserve order during opml import (#707)
This commit is contained in:
@@ -44,7 +44,15 @@ public class FeedSubscriptionService {
|
||||
private final CacheService cache;
|
||||
private final CommaFeedConfiguration config;
|
||||
|
||||
public Feed subscribe(User user, String url, String title, FeedCategory category) {
|
||||
public Feed subscribe(User user, String url, String title) {
|
||||
return subscribe(user, url, title, null, 0);
|
||||
}
|
||||
|
||||
public Feed subscribe(User user, String url, String title, FeedCategory parent) {
|
||||
return subscribe(user, url, title, parent, 0);
|
||||
}
|
||||
|
||||
public Feed subscribe(User user, String url, String title, FeedCategory category, int position) {
|
||||
|
||||
final String pubUrl = config.getApplicationSettings().getPublicUrl();
|
||||
if (StringUtils.isBlank(pubUrl)) {
|
||||
@@ -63,7 +71,7 @@ public class FeedSubscriptionService {
|
||||
sub.setUser(user);
|
||||
}
|
||||
sub.setCategory(category);
|
||||
sub.setPosition(0);
|
||||
sub.setPosition(position);
|
||||
sub.setTitle(FeedUtils.truncate(title, 128));
|
||||
feedSubscriptionDAO.saveOrUpdate(sub);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user