diff --git a/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj b/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj index e0551f84..998f58a7 100644 --- a/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj +++ b/DiscordChatExporter.Core/DiscordChatExporter.Core.csproj @@ -1,9 +1,5 @@ - - true - - diff --git a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml index 9dda4982..84048603 100644 --- a/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml +++ b/DiscordChatExporter.Core/Exporting/MessageGroupTemplate.cshtml @@ -46,7 +46,7 @@
- @{/* System notification */} + @* System notification *@ @if (message.Kind.IsSystemNotification()) {
@@ -70,13 +70,13 @@
- @{/* Author name */} + @* Author name *@ @authorNick - @{/* Space out the content */} + @* Space out the content *@ - @{/* System notification content */} + @* System notification content *@ @if (message.Kind == MessageKind.RecipientAdd && message.MentionedUsers.Any()) { @@ -130,7 +130,7 @@ } - @{/* Timestamp */} + @* Timestamp *@ @FormatDate(message.Timestamp) @@ -222,10 +222,10 @@ // Header
- @{/* Author name */} + @* Author name *@ @authorNick - @{/* Bot tag */} + @* Bot tag *@ @if (message.Author.IsBot) { // For cross-posts, the BOT tag is replaced with the SERVER tag @@ -239,22 +239,22 @@ } } - @{/* Timestamp */} + @* Timestamp *@ @FormatDate(message.Timestamp)
} - @{/* Content */} + @* Content *@ @if ((!string.IsNullOrWhiteSpace(message.Content) && !message.IsContentHidden()) || message.EditedTimestamp is not null) {
- @{/* Text */} + @* Text *@ @if (!string.IsNullOrWhiteSpace(message.Content) && !message.IsContentHidden()) { @Html.Raw(await FormatMarkdownAsync(message.Content)) } - @{/* Edited timestamp */} + @* Edited timestamp *@ @if (message.EditedTimestamp is not null) { (edited) @@ -262,17 +262,17 @@
} - @{/* Attachments */} + @* Attachments *@ @foreach (var attachment in message.Attachments) {
- @{/* Spoiler caption */} + @* Spoiler caption *@ @if (attachment.IsSpoiler) {
SPOILER
} - @{/* Attachment preview */} + @* Attachment preview *@ @if (attachment.IsImage) { @@ -310,7 +310,7 @@
} - @{/* Invites */} + @* Invites *@ @{ var inviteCodes = MarkdownParser .ExtractLinks(message.Content) @@ -353,7 +353,7 @@ } } - @{/* Embeds */} + @* Embeds *@ @foreach (var embed in message.Embeds) { // Spotify embed @@ -369,7 +369,7 @@ else if (embed.TryGetYouTubeVideo() is { } youTubeVideoEmbed) {
- @{/* Color pill */} + @* Color pill *@ @if (embed.Color is not null) {
@@ -382,7 +382,7 @@
- @{/* Embed author */} + @* Embed author *@ @if (embed.Author is not null) {
@@ -407,7 +407,7 @@
} - @{/* Embed title */} + @* Embed title *@ @if (!string.IsNullOrWhiteSpace(embed.Title)) {
@@ -424,7 +424,7 @@
} - @{/* Video player */} + @* Video player *@
@@ -477,7 +477,7 @@ else {
- @{/* Color pill */} + @* Color pill *@ @if (embed.Color is not null) {
@@ -490,7 +490,7 @@
- @{/* Embed author */} + @* Embed author *@ @if (embed.Author is not null) {
@@ -515,7 +515,7 @@
} - @{/* Embed title */} + @* Embed title *@ @if (!string.IsNullOrWhiteSpace(embed.Title)) {
@@ -532,7 +532,7 @@
} - @{/* Embed description */} + @* Embed description *@ @if (!string.IsNullOrWhiteSpace(embed.Description)) {
@@ -540,7 +540,7 @@
} - @{/* Embed fields */} + @* Embed fields *@ @if (embed.Fields.Any()) {
@@ -566,7 +566,7 @@ }
- @{/* Embed content */} + @* Embed content *@ @if (embed.Thumbnail is not null && !string.IsNullOrWhiteSpace(embed.Thumbnail.Url)) {
@@ -577,7 +577,7 @@ }
- @{/* Embed images */} + @* Embed images *@ @if (embed.Images.Any()) {
@@ -595,18 +595,18 @@
} - @{/* Embed footer & icon */} + @* Embed footer & icon *@ @if (embed.Footer is not null || embed.Timestamp is not null) { -@{/* Preamble cuts off at this point */} +@* Preamble cuts off at this point *@
\ No newline at end of file diff --git a/DiscordChatExporter.Gui/Behaviors/MultiSelectionListBoxBehavior.cs b/DiscordChatExporter.Gui/Behaviors/MultiSelectionListBoxBehavior.cs index 7a652459..19f84078 100644 --- a/DiscordChatExporter.Gui/Behaviors/MultiSelectionListBoxBehavior.cs +++ b/DiscordChatExporter.Gui/Behaviors/MultiSelectionListBoxBehavior.cs @@ -42,7 +42,7 @@ public class MultiSelectionListBoxBehavior : Behavior set => SetValue(SelectedItemsProperty, value); } - // Propagate selected items from model to view + // Propagate selected items from the model to the view private void SelectItems() { _viewHandled = true; @@ -57,7 +57,7 @@ public class MultiSelectionListBoxBehavior : Behavior _viewHandled = false; } - // Propagate selected items from view to model + // Propagate selected items from the view to the model private void OnListBoxSelectionChanged(object? sender, SelectionChangedEventArgs args) { if (_viewHandled) return; @@ -66,7 +66,6 @@ public class MultiSelectionListBoxBehavior : Behavior SelectedItems = AssociatedObject.SelectedItems.Cast().ToArray(); } - // Re-select items when the set of items changes private void OnListBoxItemsChanged(object? sender, NotifyCollectionChangedEventArgs args) { if (_viewHandled) return; @@ -82,7 +81,6 @@ public class MultiSelectionListBoxBehavior : Behavior ((INotifyCollectionChanged) AssociatedObject.Items).CollectionChanged += OnListBoxItemsChanged; } - /// protected override void OnDetaching() { base.OnDetaching(); diff --git a/DiscordChatExporter.Gui/ViewModels/Dialogs/MessageBoxViewModel.cs b/DiscordChatExporter.Gui/ViewModels/Dialogs/MessageBoxViewModel.cs index 310305af..bfb4ce79 100644 --- a/DiscordChatExporter.Gui/ViewModels/Dialogs/MessageBoxViewModel.cs +++ b/DiscordChatExporter.Gui/ViewModels/Dialogs/MessageBoxViewModel.cs @@ -31,9 +31,9 @@ public static class MessageBoxViewModelExtensions string? cancelButtonText) { var viewModel = factory.CreateMessageBoxViewModel(); + viewModel.Title = title; viewModel.Message = message; - viewModel.IsOkButtonVisible = !string.IsNullOrWhiteSpace(okButtonText); viewModel.OkButtonText = okButtonText; viewModel.IsCancelButtonVisible = !string.IsNullOrWhiteSpace(cancelButtonText);