Skip to content

Commit

Permalink
Landing page logic fix (#4378)
Browse files Browse the repository at this point in the history
* Push fix

* Fix bug

* Prevent subscribe dropdown from opening on SubscribedChannels route
  • Loading branch information
kommunarr authored Nov 24, 2023
1 parent d8d6196 commit 16050c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ export default defineComponent({
})

this.$router.onReady(() => {
if (this.$router.currentRoute.path !== this.landingPage && this.landingPage !== '/subscriptions') {
this.$router.push({ path: this.landingPage })
if (this.$router.currentRoute.path === '/' && this.landingPage !== '/subscriptions') {
this.$router.replace({ path: this.landingPage })
}
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ export default defineComponent({
type: Boolean,
default: false
},
openDropdownOnSubscribe: {
type: Boolean,
default: true
},
subscriptionCountText: {
default: '',
type: String,
Expand Down Expand Up @@ -152,7 +156,7 @@ export default defineComponent({
}
}

if (this.isProfileDropdownEnabled && !this.isProfileDropdownOpen) {
if (this.isProfileDropdownEnabled && this.openDropdownOnSubscribe && !this.isProfileDropdownOpen) {
this.toggleProfileDropdown()
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
:channel-id="channel.id"
:channel-name="channel.name"
:channel-thumbnail="channel.thumbnail"
:open-dropdown-on-subscribe="false"
/>
</div>
</div>
Expand Down

0 comments on commit 16050c7

Please sign in to comment.