Skip to content

Commit

Permalink
Fix for opening details from bookmark results
Browse files Browse the repository at this point in the history
  • Loading branch information
libgenapps committed May 2, 2018
1 parent 466a3e5 commit 90dbf66
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
4 changes: 2 additions & 2 deletions LibgenDesktop.Setup/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
{
internal static class Constants
{
public const string CURRENT_VERSION = "1.1.0";
public const string TITLE_VERSION = "1.1.0";
public const string CURRENT_VERSION = "1.1.1";
public const string TITLE_VERSION = "1.1.1";
public const string PRODUCT_TITLE_FORMAT = "Libgen Desktop " + TITLE_VERSION + " ({0}-bit)";
public const string SHORTCUT_TITLE_FORMAT = "Libgen Desktop ({0}-bit)";
public const string PRODUCT_COMPANY = "Libgen Apps";
Expand Down
4 changes: 2 additions & 2 deletions LibgenDesktop/Common/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace LibgenDesktop.Common
{
internal static class Constants
{
public const string CURRENT_VERSION = "1.1.0";
public const string CURRENT_GITHUB_RELEASE_NAME = "1.1.0";
public const string CURRENT_VERSION = "1.1.1";
public const string CURRENT_GITHUB_RELEASE_NAME = "1.1.1";
public static readonly DateTime CURRENT_GITHUB_RELEASE_DATE = new DateTime(2018, 5, 2);
public const string CURRENT_DATABASE_VERSION = "1.0";

Expand Down
18 changes: 12 additions & 6 deletions LibgenDesktop/ViewModels/Windows/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -673,16 +673,22 @@ private void BookmarksMenuItemClick(BookmarkViewModel bookmarkViewModel)
switch (bookmarkViewModel.LibgenObjectType)
{
case LibgenObjectType.NON_FICTION_BOOK:
newTab = new NonFictionSearchResultsTabViewModel(MainModel, CurrentWindowContext, bookmarkViewModel.SearchQuery,
new List<NonFictionBook>());
NonFictionSearchResultsTabViewModel nonFictionNewTab = new NonFictionSearchResultsTabViewModel(MainModel, CurrentWindowContext,
bookmarkViewModel.SearchQuery, new List<NonFictionBook>());
nonFictionNewTab.OpenNonFictionDetailsRequested += OpenNonFictionDetailsRequested;
newTab = nonFictionNewTab;
break;
case LibgenObjectType.FICTION_BOOK:
newTab = new FictionSearchResultsTabViewModel(MainModel, CurrentWindowContext, bookmarkViewModel.SearchQuery,
new List<FictionBook>());
FictionSearchResultsTabViewModel fictionNewTab = new FictionSearchResultsTabViewModel(MainModel, CurrentWindowContext,
bookmarkViewModel.SearchQuery, new List<FictionBook>());
fictionNewTab.OpenFictionDetailsRequested += OpenFictionDetailsRequested;
newTab = fictionNewTab;
break;
case LibgenObjectType.SCIMAG_ARTICLE:
newTab = new SciMagSearchResultsTabViewModel(MainModel, CurrentWindowContext, bookmarkViewModel.SearchQuery,
new List<SciMagArticle>());
SciMagSearchResultsTabViewModel sciMagNewTab = new SciMagSearchResultsTabViewModel(MainModel, CurrentWindowContext,
bookmarkViewModel.SearchQuery, new List<SciMagArticle>());
sciMagNewTab.OpenSciMagDetailsRequested += OpenSciMagDetailsRequested;
newTab = sciMagNewTab;
break;
default:
newTab = null;
Expand Down

0 comments on commit 90dbf66

Please sign in to comment.