Skip to content

Commit 2b6a13f

Browse files
author
Jani Giannoudis
committed
file asset service: fixed status update
1 parent 38e518c commit 2b6a13f

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

Core/Asset/FileAssetService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ public async Task UpdateStatusAsync()
113113
await asset.UpdateStatusAsync(AssetContext);
114114
}
115115
}
116+
ValidStatus = true;
116117
}
117118

118119
#endregion

Core/WebServer/WebServerConnection.cs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ public WebserverConnection(WebserverConnection copy)
4646
/// <summary>
4747
/// Convert to url
4848
/// </summary>
49-
public string ToUrl() =>
50-
string.IsNullOrWhiteSpace(BaseUrl) ?
51-
string.Empty :
52-
Port != 0 ?
53-
$"{BaseUrl}:{Port}" :
54-
BaseUrl;
49+
public string ToUrl()
50+
{
51+
if (string.IsNullOrWhiteSpace(BaseUrl))
52+
{
53+
return string.Empty;
54+
}
55+
56+
var url = BaseUrl.Trim().TrimEnd(['/', '\\']);
57+
return Port == 0 ? url : $"{url}:{Port}";
58+
}
5559

5660
/// <summary>
5761
/// Test for empty connection

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net9.0</TargetFramework>
5-
<Version>0.9.0-beta.1</Version>
5+
<Version>0.9.0-beta.1.1</Version>
66
<FileVersion>0.9.0</FileVersion>
77
<InformationalVersion></InformationalVersion>
88
<Authors>Jani Giannoudis</Authors>

Presentation/Components/Pages/Main.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ protected override async Task OnInitializedAsync()
279279
/// <inheritdoc />
280280
protected override async Task OnAfterRenderAsync(bool firstRender)
281281
{
282-
var updateStatus = (firstRender || !AssetService.ValidStatus) && !StatusUpdating;
282+
var updateStatus = firstRender || !AssetService.ValidStatus;
283283

284284
// update status
285285
if (updateStatus)

0 commit comments

Comments
 (0)