general fixes
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Michele Scandura 2021-09-24 10:21:44 +01:00
parent 3e1acd26f2
commit 85e2f699bf
6 changed files with 29 additions and 14 deletions

View File

@ -23,7 +23,7 @@ namespace Sledgemapper.Api.Handlers
{
try
{
var user = await _dbcontext.Users.FindAsync(notification.UserId, cancellationToken);
var user = await _dbcontext.Users.FindAsync(new object[] { notification.UserId }, cancellationToken);
_dbcontext.Attach(user);
var campaign = new Core.Entities.Campaign
{

View File

@ -9,19 +9,19 @@
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="8.1.1" />
<PackageReference Include="mediatr" Version="9.0.0" />
<PackageReference Include="mediatr.extensions.microsoft.dependencyinjection" Version="9.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.6">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.10">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.10" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.4" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.11.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.6" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.2" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.12.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
</ItemGroup>
<PropertyGroup>

View File

@ -301,7 +301,16 @@ namespace Sledgemapper
Program.helper.SaveUnencryptedTokenCache(JsonSerializer.SerializeToUtf8Bytes(_authenticateResponse));
await Connection.StopAsync();
State.Instance.CampaignId=Guid.Empty;
State.Instance.CampaignName = string.Empty;
State.Instance.SessionId = Guid.Empty;
State.Instance.MapId = Guid.Empty;
State.Instance.MapName = string.Empty;
SessionData.SessionId = Guid.Empty;
SessionData.SessionName = string.Empty;
SessionData.Players.Clear();
return _authenticateResponse;
}

View File

@ -57,6 +57,7 @@ namespace Sledgemapper
MyraEnvironment.Game = this;
_sessionData = new Session();
IsFixedTimeStep = true;
TargetElapsedTime = TimeSpan.FromSeconds(1d / 30d);

View File

@ -58,7 +58,7 @@
<PackageReference Include="polly" Version="7.2.2" />
<PackageReference Include="polly.extensions.http" Version="3.0.0" />
<PackageReference Include="Refit.HttpClientFactory" Version="6.0.94" />
<PackageReference Include="Sentry" Version="3.9.2" />
<PackageReference Include="Sentry" Version="3.9.3" />
<PackageReference Include="TinyMessenger" Version="1.4.0-alpha3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>

View File

@ -229,7 +229,12 @@ namespace Sledgemapper.UI
//MenuConnectJoin.Enabled = true;
MenuCampaignOpen.Enabled = true;
MenuCampaingNew.Enabled = true;
MenuMapNew.Enabled = false;
MenuMapOpen.Enabled = false;
lblCampaign.Text = "n/a";
lblMap.Text = "n/a";
CommunicationManager.SessionData.MapEntityAdded -= OnMapEntityAdded;
CommunicationManager.SessionData.MapEntityDeleted -= OnMapEntityDeleted;
lblUsername.Text = $"{obj.Initials}";
}