mobile: update

This commit is contained in:
ammarahm-ed
2023-01-24 19:08:46 +05:00
parent 26bc156323
commit 51858199fd
5 changed files with 85 additions and 71 deletions

View File

@@ -49,62 +49,70 @@ export const GeckoViewLoader = () => {
}}
>
<>
<Paragraph
style={{ marginTop: 10,marginBottom:10 }}
color={colors.icon}
size={SIZE.sm}
>
{installed
? "GeckoView is already downloaded & installed on this device."
: "Installing GeckoView will download additional data on your phone."}
</Paragraph>
{!installed ? (
<Button
title="Install GeckoView"
type="accent"
style={{
borderRadius: 100,
width: 250,
alignSelf: "flex-start"
}}
onPress={async () => {
try {
await SplitModuleLoader.installModule("geckoview");
SettingsService.set({
useGeckoView: true
});
} catch (e) {
ToastEvent.error(e as Error);
}
}}
/>
<Paragraph
style={{ marginTop: 10, marginBottom: 10 }}
color={colors.icon}
size={SIZE.sm}
>
{installed
? "GeckoView is already downloaded & installed on this device."
: "Installing GeckoView will download additional data on your phone."}
</Paragraph>
{state?.status === "downloading" ||
state?.status === "installing" ||
state?.status === "pending" ? (
<Paragraph>Installing</Paragraph>
) : (
<Button
title={enabled ? "Disable GeckoView" : "Enable GeckoView"}
type="accent"
style={{
borderRadius: 100,
width: 250,
alignSelf: "flex-start"
}}
onPress={() => {
SettingsService.set({
useGeckoView: !enabled
});
}}
/>
<>
{!installed ? (
<Button
title="Install GeckoView"
type="accent"
style={{
borderRadius: 100,
width: 250,
alignSelf: "flex-start"
}}
onPress={async () => {
try {
await SplitModuleLoader.installModule("geckoview");
SettingsService.set({
useGeckoView: true
});
} catch (e) {
ToastEvent.error(e as Error);
}
}}
/>
) : (
<Button
title={enabled ? "Disable GeckoView" : "Enable GeckoView"}
type="accent"
style={{
borderRadius: 100,
width: 250,
alignSelf: "flex-start"
}}
onPress={() => {
SettingsService.set({
useGeckoView: !enabled
});
}}
/>
)}
</>
)}
{!installed && state
? Object.keys(state).map((key) => {
<Paragraph
style={{ marginTop: 10 }}
color={colors.icon}
size={SIZE.xs + 1}
>
{key.toUpperCase()}: {state[key as never]}
</Paragraph>;
})
: null}
{state ? (
<Paragraph
style={{ marginTop: 10 }}
color={colors.icon}
size={SIZE.xs + 1}
>
{state.status}
</Paragraph>
) : null}
</>
</View>
);

View File

@@ -160,7 +160,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled true
versionCode 2028 + 1048576 * 4
versionCode 2029 + 1048576 * 4
versionName getNpmVersion()
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
@@ -289,18 +289,18 @@ android {
if (!isGeckoEnabled()) {
packagingOptions {
exclude "lib/**/libmozglue.so"
//exclude "lib/**/libmozglue.so"
exclude "lib/**/libxul.so"
exclude "lib/**/libnss3.so"
exclude "lib/**/libnssckbi.so"
exclude "lib/**/libmozavutil.so"
exclude "lib/**/libsoftokn3.so"
exclude "lib/**/libmozavcodec.so"
exclude "lib/**/libipcclientcerts.so"
exclude "lib/**/libfreebl3.so"
exclude "lib/**/libplugin-container.so"
// exclude "lib/**/libnss3.so"
// exclude "lib/**/libnssckbi.so"
// exclude "lib/**/libmozavutil.so"
// exclude "lib/**/libsoftokn3.so"
// exclude "lib/**/libmozavcodec.so"
// exclude "lib/**/libipcclientcerts.so"
// exclude "lib/**/libfreebl3.so"
// exclude "lib/**/libplugin-container.so"
//exclude "lib/**/liblgpllibs.so"
}
}
}

View File

@@ -30,10 +30,16 @@ android {
}
packagingOptions {
exclude "lib/**/liblgpllibs.so"
jniLibs {
useLegacyPackaging = true
}
exclude "lib/**/liblgpllibs.so"
exclude "lib/**/libmozglue.so"
exclude "lib/**/libnss3.so"
exclude "lib/**/libnssckbi.so"
exclude "lib/**/libmozavutil.so"
exclude "lib/**/libsoftokn3.so"
exclude "lib/**/libmozavcodec.so"
exclude "lib/**/libipcclientcerts.so"
exclude "lib/**/libfreebl3.so"
exclude "lib/**/libplugin-container.so"
}
configurations {
extractSO

View File

@@ -14,6 +14,6 @@ split="geckoview-module">
<dist:fusing dist:include="true" />
</dist:module>
<application android:extractNativeLibs="true" android:hasCode="false">
<application android:hasCode="false">
</application>
</manifest>

View File

@@ -1,6 +1,6 @@
{
"name": "@notesnook/mobile",
"version": "2.4.5",
"version": "2.4.6",
"private": true,
"license": "GPL-3.0-or-later",
"workspaces": [