|
|
@ -25,6 +25,7 @@ import static androidx.webkit.WebSettingsCompat.FORCE_DARK_ON;
|
|
|
|
|
|
|
|
|
|
|
|
import android.app.Dialog;
|
|
|
|
import android.app.Dialog;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Context;
|
|
|
|
|
|
|
|
import android.os.Build;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.View;
|
|
|
@ -85,8 +86,11 @@ public class FragmentDialogOpenFull extends FragmentDialogBase {
|
|
|
|
WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
|
|
|
|
WebSettingsCompat.setSafeBrowsingEnabled(settings, safe_browsing);
|
|
|
|
|
|
|
|
|
|
|
|
boolean dark = (Helper.isDarkTheme(context) && !force_light);
|
|
|
|
boolean dark = (Helper.isDarkTheme(context) && !force_light);
|
|
|
|
if (WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK))
|
|
|
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
|
|
|
WebSettingsCompat.setForceDark(settings, dark ? FORCE_DARK_ON : FORCE_DARK_OFF);
|
|
|
|
if (WebViewEx.isFeatureSupported(WebViewFeature.FORCE_DARK))
|
|
|
|
|
|
|
|
WebSettingsCompat.setForceDark(settings, dark ? FORCE_DARK_ON : FORCE_DARK_OFF);
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
settings.setAlgorithmicDarkeningAllowed(dark && !force_light);
|
|
|
|
|
|
|
|
|
|
|
|
settings.setLoadsImagesAutomatically(true);
|
|
|
|
settings.setLoadsImagesAutomatically(true);
|
|
|
|
settings.setBlockNetworkLoads(false);
|
|
|
|
settings.setBlockNetworkLoads(false);
|
|
|
|