mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-16 18:47:28 -05:00
Make feed read on error dialog async and preserve selection
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FeedCenter
|
||||
{
|
||||
@@ -93,6 +94,11 @@ namespace FeedCenter
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<FeedReadResult> ReadAsync(FeedCenterEntities database, bool forceRead = false)
|
||||
{
|
||||
return await Task.Run(() => Read(database, forceRead));
|
||||
}
|
||||
|
||||
private Tuple<FeedReadResult, string> RetrieveFeed()
|
||||
{
|
||||
try
|
||||
@@ -320,7 +326,7 @@ namespace FeedCenter
|
||||
var lastReadResult = LastReadResult;
|
||||
|
||||
// Build the name of the resource using the enum name and the value
|
||||
var resourceName = $"{typeof (FeedReadResult).Name}_{lastReadResult}";
|
||||
var resourceName = $"{typeof(FeedReadResult).Name}_{lastReadResult}";
|
||||
|
||||
// Try to get the value from the resources
|
||||
var resourceValue = Properties.Resources.ResourceManager.GetString(resourceName);
|
||||
|
||||
Reference in New Issue
Block a user