mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-28 17:35:27 +00:00
@@ -8,6 +8,7 @@ using DiscordChatExporter.Core.Discord.Data;
|
||||
using DiscordChatExporter.Core.Exceptions;
|
||||
using DiscordChatExporter.Core.Exporting;
|
||||
using DiscordChatExporter.Core.Utils.Extensions;
|
||||
using DiscordChatExporter.Gui.Models;
|
||||
using DiscordChatExporter.Gui.Services;
|
||||
using DiscordChatExporter.Gui.Utils;
|
||||
using DiscordChatExporter.Gui.ViewModels.Dialogs;
|
||||
@@ -169,12 +170,12 @@ public class DashboardViewModel : PropertyChangedBase
|
||||
}
|
||||
|
||||
// Threads
|
||||
if (_settingsService.ShouldShowThreads)
|
||||
if (_settingsService.ThreadInclusion != ThreadInclusion.None)
|
||||
{
|
||||
await foreach (
|
||||
var thread in _discord.GetGuildThreadsAsync(
|
||||
SelectedGuild.Id,
|
||||
_settingsService.ShouldShowArchivedThreads
|
||||
_settingsService.ThreadInclusion == ThreadInclusion.All
|
||||
)
|
||||
)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DiscordChatExporter.Gui.Models;
|
||||
using DiscordChatExporter.Gui.Services;
|
||||
using DiscordChatExporter.Gui.ViewModels.Framework;
|
||||
|
||||
@@ -26,23 +28,13 @@ public class SettingsViewModel : DialogScreen
|
||||
set => _settingsService.IsTokenPersisted = value;
|
||||
}
|
||||
|
||||
public bool ShouldShowThreads
|
||||
{
|
||||
get => _settingsService.ShouldShowThreads;
|
||||
set => _settingsService.ShouldShowThreads = value;
|
||||
}
|
||||
public IReadOnlyList<ThreadInclusion> AvailableThreadInclusions { get; } =
|
||||
Enum.GetValues<ThreadInclusion>();
|
||||
|
||||
public bool ShouldShowArchivedThreads
|
||||
public ThreadInclusion ThreadInclusion
|
||||
{
|
||||
get => _settingsService.ShouldShowArchivedThreads;
|
||||
set
|
||||
{
|
||||
_settingsService.ShouldShowArchivedThreads = value;
|
||||
|
||||
// Enabling archived threads implicitly enables threads
|
||||
if (value)
|
||||
ShouldShowThreads = true;
|
||||
}
|
||||
get => _settingsService.ThreadInclusion;
|
||||
set => _settingsService.ThreadInclusion = value;
|
||||
}
|
||||
|
||||
public string DateFormat
|
||||
|
||||
Reference in New Issue
Block a user