6
6
import android .text .SpannableString ;
7
7
import android .text .style .ForegroundColorSpan ;
8
8
import android .util .TypedValue ;
9
+ import android .webkit .URLUtil ;
9
10
10
11
import androidx .annotation .NonNull ;
11
12
import androidx .annotation .Nullable ;
@@ -316,8 +317,8 @@ public void onChanged(Spannable aUrl) {
316
317
!isFocused .getValue ().get () &&
317
318
!isLibraryVisible .getValue ().get () &&
318
319
!UrlUtils .isContentFeed (getApplication (), aUrl .toString ()) &&
319
- !UrlUtils .isFileUri (aUrl .toString ()) &&
320
320
!UrlUtils .isPrivateAboutPage (getApplication (), aUrl .toString ()) &&
321
+ (URLUtil .isHttpUrl (aUrl .toString ()) || URLUtil .isHttpsUrl (aUrl .toString ())) &&
321
322
(
322
323
(SettingsStore .getInstance (getApplication ()).getTrackingProtectionLevel () != ContentBlocking .EtpLevel .NONE ) ||
323
324
isPopUpAvailable .getValue ().get () ||
@@ -332,8 +333,9 @@ public void onChanged(Spannable aUrl) {
332
333
@ Override
333
334
public void onChanged (ObservableBoolean o ) {
334
335
isUrlBarIconsVisible .postValue (new ObservableBoolean (
335
- isLoading .getValue ().get () ||
336
- isInsecureVisible .getValue ().get ()
336
+ !isLibraryVisible .getValue ().get () &&
337
+ (isLoading .getValue ().get () ||
338
+ isInsecureVisible .getValue ().get ())
337
339
));
338
340
}
339
341
};
@@ -389,10 +391,6 @@ public void setUrl(@Nullable Spannable url) {
389
391
390
392
String aURL = url .toString ();
391
393
392
- if (isLibraryVisible .getValue ().get ()) {
393
- return ;
394
- }
395
-
396
394
int index = -1 ;
397
395
try {
398
396
aURL = URLDecoder .decode (aURL , "UTF-8" );
0 commit comments