From 4347b9f5e867931eda3095f2b37bb51568cfb829 Mon Sep 17 00:00:00 2001 From: Nix Date: Sat, 2 Mar 2024 16:49:28 +0100 Subject: [PATCH] Better code style CodeViewer --- Components/Code/CodeViewer.razor | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Components/Code/CodeViewer.razor b/Components/Code/CodeViewer.razor index ab5dc39..ef2112f 100644 --- a/Components/Code/CodeViewer.razor +++ b/Components/Code/CodeViewer.razor @@ -73,14 +73,8 @@ private bool _isClicked = false; private bool _isInit = false; - private int _linesCount; private bool _expandCode = false; - protected override Task OnInitializedAsync() - { - _linesCount = Code.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries).Length; - return base.OnInitializedAsync(); - } protected override async Task OnAfterRenderAsync(bool firstRender) { @@ -99,13 +93,6 @@ return l; } - private async Task ToggleFullCode() - { - - await JSRuntime.InvokeVoidAsync("highlightCode"); - _expandCode = !_expandCode; - - } private async Task CopyToClipboard(string code) {