Skip to content

Commit

Permalink
fixup! Announce document title changes handled by apps
Browse files Browse the repository at this point in the history
  • Loading branch information
dschmidt committed Oct 13, 2022
1 parent 4e084f3 commit 16993ce
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/spaces/GenericSpace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export default defineComponent({
return segments
})
useDocumentTitle({ document, titleSegments })
useDocumentTitle({ titleSegments })
const { $gettext } = useTranslations()
const route = useRoute()
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/views/spaces/GenericTrash.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export default defineComponent({
}
return segments
})
useDocumentTitle({ document, titleSegments })
useDocumentTitle({ titleSegments })
return {
...useResourcesViewDefaults<Resource, any, any[]>(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function useAppDocumentTitle({
})

useDocumentTitle({
document,
titleSegments
})
}
10 changes: 2 additions & 8 deletions packages/web-pkg/src/composables/appDefaults/useDocumentTitle.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
import { watch, Ref, unref } from '@vue/composition-api'
import { useStore } from '../store'
import { Store } from 'vuex'
import { useEventBus } from '../eventBus/useEventBus'
import { useEventBus } from '../eventBus'
import { EventBus } from '../../services'

interface DocumentTitleOptions {
document: Document
titleSegments: Ref<string[]>
store?: Store<any>
eventBus?: EventBus
}

export function useDocumentTitle({
document,
titleSegments,
store,
eventBus
}: DocumentTitleOptions): void {
export function useDocumentTitle({ titleSegments, store, eventBus }: DocumentTitleOptions): void {
store = store || useStore()
eventBus = eventBus || useEventBus()

Expand Down
1 change: 1 addition & 0 deletions packages/web-pkg/src/composables/eventBus/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './useEventBus'

0 comments on commit 16993ce

Please sign in to comment.