66import android .text .SpannableString ;
77import android .text .style .ForegroundColorSpan ;
88import android .util .TypedValue ;
9+ import android .webkit .URLUtil ;
910
1011import androidx .annotation .NonNull ;
1112import androidx .annotation .Nullable ;
@@ -316,8 +317,8 @@ public void onChanged(Spannable aUrl) {
316317 !isFocused .getValue ().get () &&
317318 !isLibraryVisible .getValue ().get () &&
318319 !UrlUtils .isContentFeed (getApplication (), aUrl .toString ()) &&
319- !UrlUtils .isFileUri (aUrl .toString ()) &&
320320 !UrlUtils .isPrivateAboutPage (getApplication (), aUrl .toString ()) &&
321+ (URLUtil .isHttpUrl (aUrl .toString ()) || URLUtil .isHttpsUrl (aUrl .toString ())) &&
321322 (
322323 (SettingsStore .getInstance (getApplication ()).getTrackingProtectionLevel () != ContentBlocking .EtpLevel .NONE ) ||
323324 isPopUpAvailable .getValue ().get () ||
@@ -332,8 +333,9 @@ public void onChanged(Spannable aUrl) {
332333 @ Override
333334 public void onChanged (ObservableBoolean o ) {
334335 isUrlBarIconsVisible .postValue (new ObservableBoolean (
335- isLoading .getValue ().get () ||
336- isInsecureVisible .getValue ().get ()
336+ !isLibraryVisible .getValue ().get () &&
337+ (isLoading .getValue ().get () ||
338+ isInsecureVisible .getValue ().get ())
337339 ));
338340 }
339341 };
@@ -389,10 +391,6 @@ public void setUrl(@Nullable Spannable url) {
389391
390392 String aURL = url .toString ();
391393
392- if (isLibraryVisible .getValue ().get ()) {
393- return ;
394- }
395-
396394 int index = -1 ;
397395 try {
398396 aURL = URLDecoder .decode (aURL , "UTF-8" );
0 commit comments