Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

Commit 89ddf05

Browse files
committed
Make the local feed initial setup async again
My previous commits made the initial sync prevent the feed screen from coming up until it was finished. This makes that piece async again.
1 parent 7164131 commit 89ddf05

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

plugins/backend/local/localInterface.vala

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,21 @@ public void writeData()
158158

159159
public async void postLoginAction()
160160
{
161-
var children = m_feedlist.get_children();
162-
foreach(var r in children)
163-
{
164-
var row = r as SuggestedFeedRow;
165-
if(row.checked())
161+
SourceFunc callback = postLoginAction.callback;
162+
new GLib.Thread<void*>(null, () => {
163+
var children = m_feedlist.get_children();
164+
foreach(var r in children)
166165
{
167-
FeedReaderBackend.get_default().addFeed(row.getURL(), row.getCategory(), false);
166+
var row = r as SuggestedFeedRow;
167+
if(row.checked())
168+
{
169+
FeedReaderBackend.get_default().addFeed(row.getURL(), row.getCategory(), false);
170+
}
168171
}
169-
}
172+
Idle.add((owned) callback);
173+
return null;
174+
});
175+
yield;
170176
}
171177

172178
public string buildLoginURL()

0 commit comments

Comments
 (0)