1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2024-10-17 09:42:45 +02:00
TweetDuck/lib/TweetLib.Core/Features/Notifications/NotificationBrowser.Screenshot.cs

26 lines
993 B
C#

using System;
using System.Collections.Generic;
using TweetLib.Browser.Base;
using TweetLib.Browser.Interfaces;
using TweetLib.Utils.Data;
namespace TweetLib.Core.Features.Notifications {
public abstract partial class NotificationBrowser {
public sealed class Screenshot : NotificationBrowser {
private readonly IEnumerable<InjectedString> notificationInjections;
public Screenshot(IBrowserComponent browserComponent, IEnumerable<InjectedString> notificationInjections) : base(browserComponent, CreateSetupObject) {
this.notificationInjections = notificationInjections;
}
public override string GetTweetHTML(DesktopNotification notification) {
return notification.GenerateHtml("td-screenshot", HeadLayout, App.UserConfiguration.CustomNotificationCSS, notificationInjections, Array.Empty<string>());
}
private static BrowserSetup CreateSetupObject(NotificationBrowser browser) {
return BaseBrowser.CreateSetupObject(browser.browserComponent);
}
}
}
}