mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-02-16 10:58:31 -05:00
More UI updates and cleanup
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
using System;
|
||||
using JetBrains.Annotations;
|
||||
using Realms;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using JetBrains.Annotations;
|
||||
using Realms;
|
||||
|
||||
namespace FeedCenter;
|
||||
|
||||
@@ -20,9 +19,6 @@ public class Category : RealmObject, INotifyDataErrorInfo
|
||||
_dataErrorDictionary.ErrorsChanged += DataErrorDictionaryErrorsChanged;
|
||||
}
|
||||
|
||||
[Ignored]
|
||||
public ICollection<Feed> Feeds { get; set; }
|
||||
|
||||
[PrimaryKey]
|
||||
public Guid Id { get; set; } = Guid.NewGuid();
|
||||
|
||||
|
||||
@@ -22,42 +22,6 @@ using System.Text.RegularExpressions;
|
||||
|
||||
namespace FeedCenter;
|
||||
|
||||
#region Enumerations
|
||||
|
||||
public enum MultipleOpenAction
|
||||
{
|
||||
IndividualPages,
|
||||
SinglePage
|
||||
}
|
||||
|
||||
public enum FeedType
|
||||
{
|
||||
Unknown,
|
||||
Rss,
|
||||
Rdf,
|
||||
Atom
|
||||
}
|
||||
|
||||
public enum FeedReadResult
|
||||
{
|
||||
Success,
|
||||
NotModified,
|
||||
NotDue,
|
||||
UnknownError,
|
||||
InvalidXml,
|
||||
NotEnabled,
|
||||
Unauthorized,
|
||||
NoResponse,
|
||||
NotFound,
|
||||
Timeout,
|
||||
ConnectionFailed,
|
||||
ServerError,
|
||||
Moved,
|
||||
TemporarilyUnavailable
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public partial class Feed : RealmObject, INotifyDataErrorInfo
|
||||
{
|
||||
private static HttpClient _httpClient;
|
||||
@@ -71,9 +35,7 @@ public partial class Feed : RealmObject, INotifyDataErrorInfo
|
||||
}
|
||||
|
||||
public bool Authenticate { get; set; }
|
||||
|
||||
public Guid CategoryId { get; set; }
|
||||
|
||||
public int CheckInterval { get; set; } = 60;
|
||||
public string Description { get; set; }
|
||||
public bool Enabled { get; set; } = true;
|
||||
@@ -225,8 +187,6 @@ public partial class Feed : RealmObject, INotifyDataErrorInfo
|
||||
_dataErrorDictionary.AddError(propertyName, $"{propertyName} cannot be empty");
|
||||
}
|
||||
|
||||
#region Reading
|
||||
|
||||
public FeedReadResult Read(bool forceRead = false)
|
||||
{
|
||||
Log.Logger.Information("Reading feed: {0}", Source);
|
||||
@@ -494,6 +454,4 @@ public partial class Feed : RealmObject, INotifyDataErrorInfo
|
||||
|
||||
[GeneratedRegex("&(?!(?:[a-z]+|#[0-9]+|#x[0-9a-f]+);)")]
|
||||
private static partial Regex UnescapedAmpersandRegex();
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -9,9 +9,6 @@ public partial class FeedItem : RealmObject
|
||||
{
|
||||
public bool BeenRead { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public Feed Feed { get; set; }
|
||||
|
||||
public Guid FeedId { get; set; }
|
||||
public string Guid { get; set; }
|
||||
|
||||
@@ -22,7 +19,6 @@ public partial class FeedItem : RealmObject
|
||||
public string Link { get; set; }
|
||||
public bool New { get; set; }
|
||||
public int Sequence { get; set; }
|
||||
|
||||
public string Title { get; set; }
|
||||
|
||||
public static FeedItem Create()
|
||||
|
||||
19
Application/Feeds/FeedReadResult.cs
Normal file
19
Application/Feeds/FeedReadResult.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace FeedCenter;
|
||||
|
||||
public enum FeedReadResult
|
||||
{
|
||||
Success,
|
||||
NotModified,
|
||||
NotDue,
|
||||
UnknownError,
|
||||
InvalidXml,
|
||||
NotEnabled,
|
||||
Unauthorized,
|
||||
NoResponse,
|
||||
NotFound,
|
||||
Timeout,
|
||||
ConnectionFailed,
|
||||
ServerError,
|
||||
Moved,
|
||||
TemporarilyUnavailable
|
||||
}
|
||||
9
Application/Feeds/FeedType.cs
Normal file
9
Application/Feeds/FeedType.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace FeedCenter;
|
||||
|
||||
public enum FeedType
|
||||
{
|
||||
Unknown,
|
||||
Rss,
|
||||
Rdf,
|
||||
Atom
|
||||
}
|
||||
7
Application/Feeds/MultipleOpenAction.cs
Normal file
7
Application/Feeds/MultipleOpenAction.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace FeedCenter;
|
||||
|
||||
public enum MultipleOpenAction
|
||||
{
|
||||
IndividualPages,
|
||||
SinglePage
|
||||
}
|
||||
Reference in New Issue
Block a user