[rss] ability to hide feed from list

This commit is contained in:
Andriy
2022-11-02 11:02:41 +02:00
parent 8e0eea3025
commit c50d5f63ba
2 changed files with 8 additions and 2 deletions
+5 -1
View File
@@ -64,7 +64,11 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Data
[Required]
[DefaultValue(false)]
public bool WatchPostDate { get; set; }
[Required]
[DefaultValue(false)]
public bool IsPrivate { get; set; }
public Feed()
{
FeedId = new Guid();
+3 -1
View File
@@ -115,7 +115,9 @@ namespace Kruzya.TelegramBot.RichSiteSummary.Handler
var chat = editableMessage != null ? (editableMessage.Chat) : Chat;
var elementsOnPage = 9;
var startIndex = page * elementsOnPage;
var dbQuery = _dbContext.Feeds.AsQueryable();
var dbQuery = _dbContext.Feeds.AsQueryable()
.Where(f => !f.IsPrivate);
if (!string.IsNullOrWhiteSpace(query))
{
var searchQuery = query.ToLower();