Skip to content

Commit

Permalink
Fix mock compile error in release mode
Browse files Browse the repository at this point in the history
  • Loading branch information
BobLd committed Sep 26, 2021
1 parent c11cc12 commit 02b4aeb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Panoptes.Avalonia/SessionService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.Toolkit.Mvvm.Messaging;
using Panoptes.Model;
using Panoptes.Model.Messages;
using Panoptes.Model.Mock.Sessions;
using Panoptes.Model.MongoDB.Sessions;
using Panoptes.Model.Sessions;
using Panoptes.Model.Sessions.File;
Expand Down Expand Up @@ -186,7 +185,7 @@ public void Open(ISessionParameters parameters)

// Open a new session and open it
#if DEBUG
var session = new MockStreamSession(this, _resultConverter, streamParameters);
var session = new Model.Mock.Sessions.MockStreamSession(this, _resultConverter, streamParameters);
#else
var session = new StreamSession(this, _resultConverter, streamParameters);
#endif
Expand Down
14 changes: 13 additions & 1 deletion Panoptes.ViewModels/NewSession/NewFileSessionViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,19 @@ public NewFileSessionViewModel(ISessionService sessionService)

private void Open()
{
_sessionService.Open(_fileSessionParameters);
try
{
// TODO: start waiting icon
_sessionService.Open(_fileSessionParameters);
}
catch (System.Exception)
{
throw;
}
finally
{
//
}
}

private bool CanOpen()
Expand Down

0 comments on commit 02b4aeb

Please sign in to comment.