From ebac2b4eb7ce4ef6bf651dd366ac580212840a04 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Wed, 15 Jul 2026 19:49:38 +0200 Subject: [PATCH] Add EchoHub as submodule and update project references paths --- .gitmodules | 3 +++ Decho/Decho.csproj | 4 ++-- Decho/Services/ConnectionService.cs | 13 ++++++++++++- EchoHub | 1 + 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 160000 EchoHub diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..deca2eb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "EchoHub"] + path = EchoHub + url = https://github.com/HueByte/EchoHub.git diff --git a/Decho/Decho.csproj b/Decho/Decho.csproj index 831bf40..9880eda 100644 --- a/Decho/Decho.csproj +++ b/Decho/Decho.csproj @@ -34,7 +34,7 @@ - - + + diff --git a/Decho/Services/ConnectionService.cs b/Decho/Services/ConnectionService.cs index 4dc03b4..5434381 100644 --- a/Decho/Services/ConnectionService.cs +++ b/Decho/Services/ConnectionService.cs @@ -388,7 +388,18 @@ public sealed class ConnectionService : IDisposable { if (!_connections.TryGetValue(serverUrl, out var entry)) return null; - return await entry.ApiClient.DownloadBytesAsync(relativeUrl); + try + { + var tempPath = await entry.ApiClient.DownloadFileToTempAsync(relativeUrl, "image"); + if (tempPath is null) return null; + var bytes = await File.ReadAllBytesAsync(tempPath); + try { File.Delete(tempPath); } catch { } + return bytes; + } + catch + { + return null; + } } public string? GetCurrentUsername(string serverUrl) diff --git a/EchoHub b/EchoHub new file mode 160000 index 0000000..3538ec8 --- /dev/null +++ b/EchoHub @@ -0,0 +1 @@ +Subproject commit 3538ec8005fee153b5741b2eab6823365dae8fa9