From 712ad189c99570f686ab779782b2a873e172428e Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 13 Jun 2023 20:25:05 +0200 Subject: Change syntax style --- MatrixRoomUtils.Web/Shared/LogView.razor | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'MatrixRoomUtils.Web/Shared/LogView.razor') diff --git a/MatrixRoomUtils.Web/Shared/LogView.razor b/MatrixRoomUtils.Web/Shared/LogView.razor index 80fd355..2f83cb2 100644 --- a/MatrixRoomUtils.Web/Shared/LogView.razor +++ b/MatrixRoomUtils.Web/Shared/LogView.razor @@ -1,6 +1,5 @@ @using System.Text -@if (LocalStorageWrapper.Settings.DeveloperSettings.EnableLogViewers) -{ +@if (LocalStorageWrapper.Settings.DeveloperSettings.EnableLogViewers) { Logs
@@ -10,11 +9,10 @@
 
 @code {
     StringBuilder _stringBuilder = new();
-    protected override async Task OnInitializedAsync()
-    {
+
+    protected override async Task OnInitializedAsync() {
         await LocalStorageWrapper.LoadFromLocalStorage(LocalStorage);
-        if (!LocalStorageWrapper.Settings.DeveloperSettings.EnableConsoleLogging)
-        {
+        if (!LocalStorageWrapper.Settings.DeveloperSettings.EnableConsoleLogging) {
             Console.WriteLine("Console logging disabled!");
             var _sw = new StringWriter();
             Console.SetOut(_sw);
@@ -22,19 +20,16 @@
             return;
         }
         if (!LocalStorageWrapper.Settings.DeveloperSettings.EnableLogViewers) return;
-        //intecept stdout with textwriter to get logs
+    //intecept stdout with textwriter to get logs
         var sw = new StringWriter(_stringBuilder);
         Console.SetOut(sw);
         Console.SetError(sw);
-        //keep updated
-        int length = 0;
-        Task.Run(async () =>
-        {
-            while (true)
-            {
+    //keep updated
+        var length = 0;
+        Task.Run(async () => {
+            while (true) {
                 await Task.Delay(100);
-                if (_stringBuilder.Length != length)
-                {
+                if (_stringBuilder.Length != length) {
                     StateHasChanged();
                     length = _stringBuilder.Length;
                 }
@@ -43,4 +38,5 @@
         });
         await base.OnInitializedAsync();
     }
+
 }
\ No newline at end of file
-- 
cgit 1.5.1