mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-04-20 07:44:42 +01:00
chore: update dependencies and refactor config plugin imports (#993)
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
const {
|
||||
withAndroidManifest: NativeAndroidManifest,
|
||||
} = require("@expo/config-plugins");
|
||||
const { withAndroidManifest } = require("expo/config-plugins");
|
||||
|
||||
const withAndroidManifest = (config) =>
|
||||
NativeAndroidManifest(config, async (config) => {
|
||||
const mainApplication = config.modResults.manifest.application[0];
|
||||
const _withGoogleCastAndroidManifest = (config) =>
|
||||
withAndroidManifest(config, async (mod) => {
|
||||
const mainApplication = mod.modResults.manifest.application[0];
|
||||
|
||||
// Initialize activity array if it doesn't exist
|
||||
if (!mainApplication.activity) {
|
||||
@@ -25,6 +23,7 @@ const withAndroidManifest = (config) =>
|
||||
"com.reactnative.googlecast.RNGCExpandedControllerActivity",
|
||||
"android:theme": "@style/Theme.MaterialComponents.NoActionBar",
|
||||
"android:launchMode": "singleTask",
|
||||
"android:exported": "false",
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -33,11 +32,11 @@ const withAndroidManifest = (config) =>
|
||||
(activity) => activity.$?.["android:name"] === ".MainActivity",
|
||||
);
|
||||
|
||||
if (mainActivity) {
|
||||
if (mainActivity?.$) {
|
||||
mainActivity.$["android:supportsPictureInPicture"] = "true";
|
||||
}
|
||||
|
||||
return config;
|
||||
return mod;
|
||||
});
|
||||
|
||||
module.exports = withAndroidManifest;
|
||||
module.exports = _withGoogleCastAndroidManifest;
|
||||
|
||||
Reference in New Issue
Block a user