mirror of
https://github.com/AllanWang/Frost-for-Facebook.git
synced 2024-11-09 20:42:34 +01:00
Support messenger usage when default apps are enabled
This commit is contained in:
parent
3b6de26ee1
commit
30c45b6120
@ -130,6 +130,18 @@
|
||||
<data
|
||||
android:host="www.facebook.com"
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="messenger.com"
|
||||
android:scheme="http" />
|
||||
<data
|
||||
android:host="messenger.com"
|
||||
android:scheme="https" />
|
||||
<data
|
||||
android:host="www.messenger.com"
|
||||
android:scheme="http" />
|
||||
<data
|
||||
android:host="www.messenger.com"
|
||||
android:scheme="https" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity
|
||||
|
@ -314,6 +314,9 @@ fun Context.startActivityForUri(uri: Uri): Boolean {
|
||||
if (url.isFacebookUrl && !url.isExplicitIntent) {
|
||||
return false
|
||||
}
|
||||
if (url.isMessengerUrl) {
|
||||
return false
|
||||
}
|
||||
val intent = Intent(
|
||||
Intent.ACTION_VIEW,
|
||||
uri.formattedFbUri
|
||||
|
@ -28,6 +28,7 @@ import com.pitchedapps.frost.utils.isFacebookUrl
|
||||
import com.pitchedapps.frost.utils.isImageUrl
|
||||
import com.pitchedapps.frost.utils.isIndependent
|
||||
import com.pitchedapps.frost.utils.isIndirectImageUrl
|
||||
import com.pitchedapps.frost.utils.isMessengerUrl
|
||||
import com.pitchedapps.frost.utils.isVideoUrl
|
||||
import com.pitchedapps.frost.utils.launchImageActivity
|
||||
import com.pitchedapps.frost.utils.launchWebOverlay
|
||||
@ -76,7 +77,7 @@ fun FrostWebView.requestWebOverlay(url: String): Boolean {
|
||||
}
|
||||
if (!prefs.overlayEnabled) return false
|
||||
if (context is WebOverlayActivityBase) {
|
||||
val shouldUseDesktop = url.isFacebookUrl
|
||||
val shouldUseDesktop = url.isFacebookUrl || url.isMessengerUrl
|
||||
// already overlay; manage user agent
|
||||
if (userAgentString != USER_AGENT_DESKTOP_CONST && shouldUseDesktop) {
|
||||
L._i { "Switch to desktop agent overlay" }
|
||||
|
Loading…
Reference in New Issue
Block a user