mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
try to avoid FILL500 getting stuck in some devices
This commit is contained in:
@@ -67,6 +67,7 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
|
||||
private static final String EXTRA_HIDE_ACTION_BAR = "hideActionBar";
|
||||
private static final String EXTRA_HREF = "href";
|
||||
private static final int REQUEST_CODE_FILE_PICKER = 51426;
|
||||
private static long lastOpenTime = 0;
|
||||
|
||||
private ValueCallback<Uri[]> filePathCallback;
|
||||
private DcContext dcContext;
|
||||
@@ -233,7 +234,16 @@ public class WebxdcActivity extends WebViewActivity implements DcEventCenter.DcE
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
webView.loadUrl(this.baseURL + "/webxdc_bootstrap324567869.html?i=" + (internetAccess? "1" : "0") + "&href=" + encodedHref);
|
||||
long now = System.currentTimeMillis();
|
||||
long timeDelta = now - lastOpenTime;
|
||||
lastOpenTime = now;
|
||||
final String url = this.baseURL + "/webxdc_bootstrap324567869.html?i=" + (internetAccess? "1" : "0") + "&href=" + encodedHref;
|
||||
Util.runOnAnyBackgroundThread(() -> {
|
||||
if (timeDelta < 2000) Util.sleep(1000);
|
||||
Util.runOnMain(() -> {
|
||||
webView.loadUrl(url);
|
||||
});
|
||||
});
|
||||
|
||||
Util.runOnAnyBackgroundThread(() -> {
|
||||
final DcChat chat = dcContext.getChat(dcAppMsg.getChatId());
|
||||
|
||||
Reference in New Issue
Block a user