Skip to content

Commit 68fc48d

Browse files
empratyushthestinger
authored andcommitted
add on (doc) loaded callback
1 parent 3ebdfd0 commit 68fc48d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

app/src/main/assets/viewer.js

+1
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ function loadDocument() {
210210
}
211211

212212
loadingTask.promise.then(function (newDoc) {
213+
channel.onLoaded();
213214
pdfDoc = newDoc;
214215
channel.setNumPages(pdfDoc.numPages);
215216
pdfDoc.getMetadata().then(function (data) {

app/src/main/java/app/grapheneos/pdfviewer/PdfViewer.java

+4
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ public void invalidPassword() {
202202
showPasswordPrompt();
203203
}
204204

205+
@JavascriptInterface
206+
public void onLoaded() {
207+
}
208+
205209
@JavascriptInterface
206210
public String getPassword() {
207211
return mEncryptedDocumentPassword != null ? mEncryptedDocumentPassword : "";

0 commit comments

Comments
 (0)