Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ else if (preferences.getBoolean("basic_mode", false))
// handle fb://profile/<facebook_id> links
if (!TextUtils.isEmpty(webViewUrl))
webViewUrl = webViewUrl.replace("fb://profile/", "https://facebook.com/");
if (!TextUtils.isEmpty(webViewUrl))
if(webViewUrl.startsWith("https://www.facebook.com/") || webViewUrl.startsWith("http://www.facebook.com/") || webViewUrl.startsWith("http://facebook.com/") || webViewUrl.startsWith("https://facebook.com/"))
webViewUrl = webViewUrl.replace("www.facebook.com", "m.facebook.com");

// show information about loading an external link
Toast.makeText(getApplicationContext(), getString(R.string.loading_link), Toast.LENGTH_SHORT).show();
Expand Down Expand Up @@ -974,6 +977,9 @@ protected void onNewIntent(Intent intent) {
// handle fb://profile/<facebook_id> links
if (!TextUtils.isEmpty(webViewUrl))
webViewUrl = webViewUrl.replace("fb://profile/", "https://facebook.com/");
if (!TextUtils.isEmpty(webViewUrl))
if(webViewUrl.startsWith("https://www.facebook.com/") || webViewUrl.startsWith("http://www.facebook.com/") || webViewUrl.startsWith("http://facebook.com/") || webViewUrl.startsWith("https://facebook.com/"))
webViewUrl = webViewUrl.replace("www.facebook.com", "m.facebook.com");

// code optimization
boolean isConnectedMobile = Connectivity.isConnectedMobile(getApplicationContext());
Expand Down