mirror of
https://github.com/gsantner/dandelion
synced 2024-11-21 20:02:07 +01:00
Fix webview-js dialog not dismissing correctly
This commit is contained in:
parent
08242760bb
commit
618f3eaaba
3 changed files with 8 additions and 17 deletions
|
@ -100,6 +100,7 @@ public class ContextMenuWebView extends NestedWebView {
|
|||
MainActivity.REQUEST_CODE__ACCESS_EXTERNAL_STORAGE);
|
||||
}
|
||||
})
|
||||
.setCancelable(false)
|
||||
.setNegativeButton(context.getText(android.R.string.no), null)
|
||||
.show();
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package com.github.dfa.diaspora_android.web;
|
||||
|
||||
import android.content.DialogInterface;
|
||||
import android.webkit.JsResult;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.ProgressBar;
|
||||
|
@ -65,20 +64,13 @@ public class DiasporaStreamWebChromeClient extends FileUploadWebChromeClient {
|
|||
ThemedAlertDialogBuilder builder = new ThemedAlertDialogBuilder(view.getContext(), AppSettings.get());
|
||||
builder.setTitle(view.getContext().getString(R.string.confirmation))
|
||||
.setMessage(message)
|
||||
.setPositiveButton(android.R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
result.confirm();
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel,
|
||||
new DialogInterface.OnClickListener() {
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
.setPositiveButton(android.R.string.ok, (dialog, which) -> result.confirm())
|
||||
.setNegativeButton(android.R.string.cancel, (dialog, which) -> result.cancel())
|
||||
.setOnCancelListener(dialog -> {
|
||||
result.cancel();
|
||||
}
|
||||
dialog.dismiss();
|
||||
})
|
||||
.create()
|
||||
.show();
|
||||
.create().show();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,8 +12,6 @@ buildscript {
|
|||
ext.version_library_appcompat = "27.1.0"
|
||||
// https://github.com/JakeWharton/butterknife/releases
|
||||
ext.version_library_butterknife = "8.8.1"
|
||||
// https://github.com/atlassian/commonmark-java/releases
|
||||
ext.version_library_commonmark = "0.10.0"
|
||||
// https://github.com/guardianproject/NetCipher/releases
|
||||
ext.version_library_netcipher = "2.0.0-alpha1"
|
||||
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin#LookAtCentral
|
||||
|
|
Loading…
Reference in a new issue