Skip to content

Commit

Permalink
Only forward to web from new tab
Browse files Browse the repository at this point in the history
  • Loading branch information
haanhvu committed Jan 10, 2025
1 parent b712ebc commit 733752f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,15 @@ private void setUrl(@Nullable Spannable url) {
spannable.setSpan(color1, 0, index + 3, 0);
spannable.setSpan(color2, index + 3, aURL.length(), 0);
this.url.postValue(spannable);
if (currentContentType.getValue() == Windows.ContentType.WEB_CONTENT && lastContentType.getValue() == Windows.ContentType.NEW_TAB) {
//TODO: Allow other about links outside of library
if (currentContentType.getValue() == Windows.ContentType.WEB_CONTENT && lastContentType.getValue() == Windows.ContentType.NEW_TAB && !aURL.startsWith("about")) {
urlForwardFromNewTab.postValue(spannable);
}

} else {
this.url.postValue(url);
if (currentContentType.getValue() == Windows.ContentType.WEB_CONTENT && lastContentType.getValue() == Windows.ContentType.NEW_TAB) {
//TODO: Allow other about links outside of library
if (currentContentType.getValue() == Windows.ContentType.WEB_CONTENT && lastContentType.getValue() == Windows.ContentType.NEW_TAB && !aURL.startsWith("about")) {
urlForwardFromNewTab.postValue(url);
}
}
Expand Down

0 comments on commit 733752f

Please sign in to comment.