Start cleaning up account types

This commit is contained in:
2025-11-15 15:30:23 -05:00
parent 6bae35a255
commit 66ea567eaa
23 changed files with 82 additions and 88 deletions

View File

@@ -1,8 +1,8 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using FeedCenter.Accounts;
using FeedCenter.Options;
using Realms;
@@ -86,24 +86,7 @@ public partial class FeedItem : RealmObject
if (feed == null || feed.Account.Type == AccountType.Local)
return;
switch (feed.Account.Type)
{
case AccountType.Fever:
// Delegate to the right reader based on the account type
await new FeverReader(feed.Account).MarkFeedItemRead(RemoteId);
break;
case AccountType.Miniflux:
// Delegate to the right reader based on the account type
await new MinifluxReader(feed.Account).MarkFeedItemRead(RemoteId);
break;
case AccountType.Local:
break;
default:
Debug.Assert(false);
break;
}
await AccountReaderFactory.CreateAccountReader(feed.Account).MarkFeedItemRead(RemoteId);
}
[GeneratedRegex("\\n")]