Add default subscription

This commit is contained in:
Jaidyn Ann 2021-03-21 13:45:06 -05:00
parent f5e5f08e8d
commit ff7d97aa80
3 changed files with 13 additions and 2 deletions

View File

@ -97,6 +97,12 @@ FeedController::SubscribedFeeds()
BDirectory subDir(subPath.Path());
if (subDir.InitCheck() == B_ENTRY_NOT_FOUND) {
subDir.CreateDirectory(subPath.Path(), &subDir);
subPath.Append("Haiku Project");
Feed defaultSub(BUrl("https://www.haiku-os.org/blog/index.xml"),
BEntry(subPath.Path()));
defaultSub.SetTitle("Haiku Project");
defaultSub.Filetize();
}
BEntry feedEntry;

View File

@ -132,6 +132,13 @@ FeedEditWindow::_SaveFeed()
BDirectory subDir(subPath.Path());
if (subDir.InitCheck() == B_ENTRY_NOT_FOUND) {
subDir.CreateDirectory(subPath.Path(), &subDir);
BPath defaultSubPath(subPath);
defaultSubPath.Append("Haiku Project");
Feed defaultSub(BUrl("https://www.haiku-os.org/blog/index.xml"),
BEntry(defaultSubPath.Path()));
defaultSub.SetTitle("Haiku Project");
defaultSub.Filetize();
}
BString title(fFeedNameText->Text());

View File

@ -18,7 +18,6 @@ Preferences::Preferences(Preferences* pref) {
}
// !! handle file status
void
Preferences::Load()
{
@ -57,7 +56,6 @@ Preferences::Load()
}
// !! handle file status
void
Preferences::Save()
{