Skip to content

Commit

Permalink
fixed all exception making to user screen meant for debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
DineshSolanki committed Aug 8, 2021
1 parent e43b609 commit 59b5891
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
11 changes: 6 additions & 5 deletions FoliCon/ViewModels/PosterPickerViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using System;
using System.Collections.ObjectModel;
using System.Globalization;
using System.IO;
using FoliCon.Properties.Langs;
using IGDB;
using IGDB.Models;
Expand Down Expand Up @@ -65,9 +64,11 @@ private void OpenImageMethod(object parameter)
var link = (string)parameter;
var browser = new ImageBrowser(Result.MediaType == MediaTypes.Game
? $"https://{ImageHelper.GetImageUrl(link, ImageSize.HD720)[2..]}"
: link);
browser.ShowTitle = false;
browser.IsFullScreen = true;
: link)
{
ShowTitle = false,
IsFullScreen = true
};
browser.Show();
}

Expand Down Expand Up @@ -108,7 +109,7 @@ public void OnDialogOpened(IDialogParameters parameters)
LoadData();

}
public async void LoadData()
public void LoadData()
{
var resultType = Result.MediaType;
var response = _isPickedById
Expand Down
10 changes: 7 additions & 3 deletions FoliCon/ViewModels/SearchResultViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,13 @@ private void MouseDoubleClick()
}
catch (Exception ex)
{
MessageBox.Show(ex.Message == "NoPoster"
? CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), SearchTitle)
: CustomMessageBox.Warning(ex.Message, LangProvider.GetLang("ExceptionOccurred")));
if (ex.Message == "NoPoster")
{
MessageBox.Show(CustomMessageBox.Warning(LangProvider.GetLang("NoPosterFound"), SearchTitle));
}
#if DEBUG
MessageBox.Show(CustomMessageBox.Warning(ex.Message, LangProvider.GetLang("ExceptionOccurred")));
#endif
}
}
}
Expand Down

0 comments on commit 59b5891

Please sign in to comment.