Skip to content

Commit

Permalink
About to start working on full text search
Browse files Browse the repository at this point in the history
  • Loading branch information
robmoffat committed Nov 3, 2022
1 parent 4adc4e0 commit 4b2832a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions packages/main/src/directory/directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export class Directory {
return Promise.all(this.urls.map((u) => this.load(u)))
.then((data) =>
data.flatMap((d) => {
console.log('here');
return d;
}),
)
Expand All @@ -45,7 +44,7 @@ export class Directory {
return result.length;
})
.catch((err) => {
console.log('Problem loading app directory');
console.error('Problem loading app directory: ' + err);
throw err;
});
}
Expand Down
14 changes: 10 additions & 4 deletions packages/main/src/handlers/runtime/resolveIntent.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { getRuntime } from '../../index';
import { RuntimeMessage } from '../runtimeMessage';
import { DirectoryApp } from '/@/handlers/fdc3/1.2/types/FDC3Data';
import { TOPICS } from '../../constants';
import {
DirectoryApp,
DirectoryAppLaunchDetailsWeb,
} from '/@/directory/directory';

export const resolveIntent = async (message: RuntimeMessage) => {
const runtime = getRuntime();
Expand All @@ -15,9 +18,12 @@ export const resolveIntent = async (message: RuntimeMessage) => {
const runtime = getRuntime();
if (runtime) {
const win = runtime.createWorkspace();
const view = win.createView(data.start_url, {
directoryData: data as DirectoryApp,
});
const view = win.createView(
(data['details'] as DirectoryAppLaunchDetailsWeb)['url'],
{
directoryData: data as DirectoryApp,
},
);

//set pending intent and context
view.setPendingIntent(
Expand Down

0 comments on commit 4b2832a

Please sign in to comment.