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);
|
MainActivity.REQUEST_CODE__ACCESS_EXTERNAL_STORAGE);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.setCancelable(false)
|
||||||
.setNegativeButton(context.getText(android.R.string.no), null)
|
.setNegativeButton(context.getText(android.R.string.no), null)
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
*/
|
*/
|
||||||
package com.github.dfa.diaspora_android.web;
|
package com.github.dfa.diaspora_android.web;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
|
||||||
import android.webkit.JsResult;
|
import android.webkit.JsResult;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
import android.widget.ProgressBar;
|
import android.widget.ProgressBar;
|
||||||
|
@ -65,20 +64,13 @@ public class DiasporaStreamWebChromeClient extends FileUploadWebChromeClient {
|
||||||
ThemedAlertDialogBuilder builder = new ThemedAlertDialogBuilder(view.getContext(), AppSettings.get());
|
ThemedAlertDialogBuilder builder = new ThemedAlertDialogBuilder(view.getContext(), AppSettings.get());
|
||||||
builder.setTitle(view.getContext().getString(R.string.confirmation))
|
builder.setTitle(view.getContext().getString(R.string.confirmation))
|
||||||
.setMessage(message)
|
.setMessage(message)
|
||||||
.setPositiveButton(android.R.string.ok,
|
.setPositiveButton(android.R.string.ok, (dialog, which) -> result.confirm())
|
||||||
new DialogInterface.OnClickListener() {
|
.setNegativeButton(android.R.string.cancel, (dialog, which) -> result.cancel())
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
.setOnCancelListener(dialog -> {
|
||||||
result.confirm();
|
result.cancel();
|
||||||
}
|
dialog.dismiss();
|
||||||
})
|
})
|
||||||
.setNegativeButton(android.R.string.cancel,
|
.create().show();
|
||||||
new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
result.cancel();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.create()
|
|
||||||
.show();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@ buildscript {
|
||||||
ext.version_library_appcompat = "27.1.0"
|
ext.version_library_appcompat = "27.1.0"
|
||||||
// https://github.com/JakeWharton/butterknife/releases
|
// https://github.com/JakeWharton/butterknife/releases
|
||||||
ext.version_library_butterknife = "8.8.1"
|
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
|
// https://github.com/guardianproject/NetCipher/releases
|
||||||
ext.version_library_netcipher = "2.0.0-alpha1"
|
ext.version_library_netcipher = "2.0.0-alpha1"
|
||||||
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin#LookAtCentral
|
// https://mvnrepository.com/artifact/org.jetbrains.kotlin/kotlin-gradle-plugin#LookAtCentral
|
||||||
|
|
Loading…
Reference in a new issue