Skip to content

Commit 936e9d1

Browse files
committed
fix(documentscanner): import file from document view was not working
1 parent 26965a7 commit 936e9d1

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

app/components/view/DocumentView.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,6 @@
257257
}
258258
}
259259
260-
261260
let inEditMode = false;
262261
function switchEditMode() {
263262
inEditMode = !inEditMode;
@@ -679,7 +678,7 @@
679678
DEV_LOG && console.log('on add option', option);
680679
if (option) {
681680
switch (option.id) {
682-
case 'import':
681+
case 'files':
683682
await importAndScanImage({ document, importPDFs: true, canGoToView: false });
684683
break;
685684
case 'import_image':
@@ -793,7 +792,11 @@
793792

794793
<stacklayout bind:this={fabHolder} class="fabHolder" marginBottom={Math.min(60, $windowInset.bottom)} orientation="horizontal" row={1}>
795794
{#if __IOS__}
796-
<mdbutton class="small-fab" text="mdi-image-plus-outline" verticalAlignment="center" on:tap={throttle(() => importPages(false), 500)} />
795+
<mdbutton
796+
class="small-fab"
797+
text="mdi-image-plus-outline"
798+
verticalAlignment="center"
799+
on:tap={throttle(() => importAndScanImage({ document, importPDFs: false, canGoToView: false, forceGalleryPick: true }), 500)} />
797800
{/if}
798801
<mdbutton class={$hasCamera ? 'small-fab' : 'fab'} text="mdi-file-document-plus-outline" verticalAlignment="center" on:tap={throttle(() => onAddButton(), 500)} />
799802
{#if $hasCamera}

0 commit comments

Comments
 (0)