mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2025-07-05 12:38:51 +02:00
Compare commits
No commits in common. "08dec7deb30dbcd46449e1060e914bfa46fa3e0c" and "895d69279f9c0f6cda4af2043f4defc5d1a489a9" have entirely different histories.
08dec7deb3
...
895d69279f
@ -45,8 +45,5 @@
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</Expander>
|
||||
<Expander Header="About" IsExpanded="True">
|
||||
<TextBlock Text="{Binding SqliteVersion, StringFormat=Sqlite Version: {0}}" />
|
||||
</Expander>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
@ -9,18 +9,14 @@ using DHT.Desktop.Dialogs.Progress;
|
||||
using DHT.Server;
|
||||
using DHT.Server.Data;
|
||||
using DHT.Server.Service;
|
||||
using PropertyChanged.SourceGenerator;
|
||||
|
||||
namespace DHT.Desktop.Main.Pages;
|
||||
|
||||
sealed partial class DebugPageModel {
|
||||
sealed class DebugPageModel {
|
||||
public string GenerateChannels { get; set; } = "0";
|
||||
public string GenerateUsers { get; set; } = "0";
|
||||
public string GenerateMessages { get; set; } = "0";
|
||||
|
||||
[Notify(Setter.Private)]
|
||||
private string? sqliteVersion = string.Empty;
|
||||
|
||||
private readonly Window window;
|
||||
private readonly State state;
|
||||
|
||||
@ -32,10 +28,6 @@ sealed partial class DebugPageModel {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public async Task Initialize() {
|
||||
SqliteVersion = await state.Db.GetVersion() ?? "<unknown>";
|
||||
}
|
||||
|
||||
public async void OnClickAddRandomDataToDatabase() {
|
||||
if (!int.TryParse(GenerateChannels, out int channels) || channels < 1) {
|
||||
await Dialog.ShowOk(window, "Generate Random Data", "Amount of channels must be at least 1!");
|
||||
@ -177,8 +169,6 @@ sealed class DebugPageModel {
|
||||
public string GenerateUsers { get; set; } = "0";
|
||||
public string GenerateMessages { get; set; } = "0";
|
||||
|
||||
public string SqliteVersion => string.Empty;
|
||||
|
||||
public void OnClickAddRandomDataToDatabase() {}
|
||||
}
|
||||
#endif
|
||||
|
@ -70,10 +70,6 @@ sealed class MainContentScreenModel : IAsyncDisposable {
|
||||
|
||||
public async Task Initialize() {
|
||||
await DownloadsPageModel.Initialize();
|
||||
|
||||
#if DEBUG
|
||||
await DebugPageModel.Initialize();
|
||||
#endif
|
||||
}
|
||||
|
||||
public async ValueTask DisposeAsync() {
|
||||
|
@ -19,10 +19,6 @@ sealed class DummyDatabaseFile : IDatabaseFile {
|
||||
|
||||
private DummyDatabaseFile() {}
|
||||
|
||||
public Task<string?> GetVersion() {
|
||||
return Task.FromResult<string?>(null);
|
||||
}
|
||||
|
||||
public Task Vacuum() {
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
@ -14,6 +14,5 @@ public interface IDatabaseFile : IAsyncDisposable {
|
||||
IMessageRepository Messages { get; }
|
||||
IDownloadRepository Downloads { get; }
|
||||
|
||||
Task<string?> GetVersion();
|
||||
Task Vacuum();
|
||||
}
|
||||
|
@ -80,11 +80,6 @@ public sealed class SqliteDatabaseFile : IDatabaseFile {
|
||||
await pool.DisposeAsync();
|
||||
}
|
||||
|
||||
public async Task<string?> GetVersion() {
|
||||
await using var conn = await pool.Take();
|
||||
return await conn.ExecuteReaderAsync("SELECT sqlite_version()", static reader => reader?.GetString(0));
|
||||
}
|
||||
|
||||
public async Task Vacuum() {
|
||||
await using var conn = await pool.Take();
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="9.0.6" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.7" />
|
||||
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@ -8,5 +8,5 @@ using DHT.Utils;
|
||||
namespace DHT.Utils;
|
||||
|
||||
static class Version {
|
||||
public const string Tag = "47.1.0.0";
|
||||
public const string Tag = "47.0.0.0";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user