Skip to content

Commit

Permalink
Fix click on artist/album link in exanded now-playing, then re-show that
Browse files Browse the repository at this point in the history
when navigate back in browse.
  • Loading branch information
CDrummond committed May 2, 2021
1 parent 6a78508 commit 5383e96
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
15 changes: 13 additions & 2 deletions MaterialSkin/HTML/material/html/js/browse-functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1087,8 +1087,19 @@ function browseGoBack(view, refresh) {
}
if (view.prevPage) {
var nextPage = ""+view.prevPage;
if (NP_INFO==nextPage) {
view.$nextTick(function () { view.$nextTick(function () { if (!view.$store.state.desktopLayout) { view.$store.commit('setPage', 'now-playing'); } bus.$emit('info');}); });
if (NP_INFO==nextPage || NP_EXPANDED==nextPage) {
view.$nextTick(function () {
view.$nextTick(function () {
if (!view.$store.state.desktopLayout) {
view.$store.commit('setPage', 'now-playing');
}
if (NP_INFO==nextPage) {
bus.$emit('info');
} else {
bus.$emit('expandNowPlaying', true);
}
});
});
} else if (!view.$store.state.desktopLayout) {
view.$nextTick(function () { view.$nextTick(function () { view.$store.commit('setPage', nextPage); }); });
}
Expand Down
6 changes: 5 additions & 1 deletion MaterialSkin/HTML/material/html/js/browse-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,11 @@ var lmsBrowse = Vue.component("lms-browse", {

bus.$on('browse', function(cmd, params, title, page) {
this.clearSelection();
if (!this.$store.state.desktopLayout) {
if (this.$store.state.desktopLayout) {
if ('now-playing'==page && this.nowPlayingExpanded) {
page = NP_EXPANDED;
}
} else {
this.$store.commit('setPage', 'browse');
}
this.goHome();
Expand Down
1 change: 1 addition & 0 deletions MaterialSkin/HTML/material/html/js/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ const SECTION_NEWMUSIC = 6; // Not a real 'section' but used to indicate when to
const SIMPLE_LIB_VIEWS = "SimpleLibraryViews ";
const GRID_SINGLE_LINE_DIFF = 20;
const NP_INFO = 'now-playing-info';
const NP_EXPANDED = 'now-playing-expanded';

const ARTIST_TYPES = ["albumartist", "trackartist", "artist", "band", "composer", "conductor"];
var MULTI_SPLIT_REGEX = ";"
Expand Down

0 comments on commit 5383e96

Please sign in to comment.