mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 17:22:19 +00:00
Voice: an app can supply what open_stories does
createApplicationTools took the Stories page as the open_stories action even when the app's voice options gave its own. voice.openStories now takes precedence, spoken or typed, with the Stories page as the default.
This commit is contained in:
1 parent
fa6d954702
commit
b1b2ac91c0
4 files changed
+76
-9
No files matched your search
+11
-7
@@ -1,5 +1,9 @@
|
||||
import { onFollowChanged } from '../data/followed.js';
|
||||
import { bootStories, stopVoiceForStories } from '../stories/boot.js';
|
||||
import {
|
||||
bootStories,
|
||||
stopVoiceForStories,
|
||||
storiesOpener,
|
||||
} from '../stories/boot.js';
|
||||
import { t } from '../i18n/index.js';
|
||||
import { useStoriesStore } from '../ui/stores/stories.js';
|
||||
import { SceneDirector } from '../scenes/director.js';
|
||||
@@ -309,12 +313,12 @@ export function createApplicationTools({
|
||||
voiceCommands = initGevVoiceCommands({
|
||||
...voice,
|
||||
canStartVoice: () => !isStoriesOpen(),
|
||||
openStories: storiesStore.available
|
||||
? ({ isCurrent }) =>
|
||||
storiesStore.mode === 'closed'
|
||||
? stories.open({ isCurrent })
|
||||
: 'already-open'
|
||||
: null,
|
||||
// An app may supply what open_stories does; the Stories page by default.
|
||||
openStories: storiesOpener({
|
||||
openStories: voice.openStories,
|
||||
store: storiesStore,
|
||||
stories,
|
||||
}),
|
||||
floorServices: operations.surface.groundFloor,
|
||||
annotationResolver: operations.annotationResolver,
|
||||
searchNavigation: operations.searchAndFlyTo,
|
||||
|
||||
Reference in new issue
Block a user