- tweak: now decompiler work fine

This commit is contained in:
2025-03-14 18:32:20 +03:00
parent 39cd190f10
commit 7e1e7bb9ad
4 changed files with 65 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
using System.IO;
using Nebula.Launcher.Services;
using Nebula.Launcher.ViewModels.Pages;
using Nebula.Shared.Utils;
namespace Nebula.Launcher.ViewModels.ContentView;
@@ -9,9 +10,14 @@ public sealed partial class DecompilerContentView: ContentViewBase
{
[GenerateProperty] private DecompilerService decompilerService {get;}
public override void InitialiseWithData(ContentPath path, Stream stream)
public override void InitialiseWithData(ContentPath path, Stream stream, ContentEntry contentEntry)
{
base.InitialiseWithData(path, stream, contentEntry);
decompilerService.OpenServerDecompiler(contentEntry.ServerName.ToRobustUrl());
}
private void unpackContent(Stream stream)
{
base.InitialiseWithData(path, stream);
var myTempFile = Path.Combine(Path.GetTempPath(), "tempie.dll");
var sw = new FileStream(myTempFile, FileMode.Create, FileAccess.Write, FileShare.None);