Skip to content

Commit

Permalink
Fix 'FreeTube' title appearing for community posts & on first search …
Browse files Browse the repository at this point in the history
…navigation
  • Loading branch information
kommunarr committed Nov 23, 2024
1 parent cf690c2 commit e64b834
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/renderer/views/Post/Post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import FtLoader from '../../components/ft-loader/ft-loader.vue'
import WatchVideoComments from '../../components/watch-video-comments/watch-video-comments.vue'
import store from '../../store/index'
import { useRoute, useRouter } from 'vue-router/composables'
import packageDetails from '../../../../package.json'
import { getInvidiousCommunityPost } from '../../helpers/api/invidious'
const router = useRouter()
Expand Down Expand Up @@ -71,6 +72,8 @@ onMounted(async () => {
async function loadDataInvidiousAsync() {
post.value = await getInvidiousCommunityPost(id.value, authorId.value)
authorId.value = post.value.authorId
store.dispatch('setAppTitle', `${post.value.author} - ${packageDetails.productName}`)
isLoading.value = false
// If the authorId is missing from the URL we should add it,
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/views/Search/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@ export default defineComponent({

this.query = query

this.setAppTitle(`${this.query} - ${packageDetails.productName}`)
this.setAppTitle(`${this.query} - ${packageDetails.productName}`)
this.checkSearchCache(payload)
}
},
mounted: function () {
this.query = this.$route.params.query
this.setAppTitle(`${this.query} - ${packageDetails.productName}`)

let features = this.$route.query.features
// if page gets refreshed and there's only one feature then it will be a string
Expand Down

0 comments on commit e64b834

Please sign in to comment.