feat: use up-to-date dynamic icon lib that doesn't support android atm

This commit is contained in:
Adrian Castro
2024-03-24 22:09:39 +01:00
parent a2761b1f7e
commit f239b4d759
4 changed files with 28 additions and 53 deletions

View File

@@ -66,29 +66,14 @@ const defineConfig = (): ExpoConfig => ({
}, },
], ],
[ [
"@config-plugins/react-native-dynamic-app-icon", "expo-alternate-app-icons",
{ [
main: { "./assets/images/main.png",
image: "./assets/images/main.png", "./assets/images/blue.png",
prerendered: true, "./assets/images/gray.png",
}, "./assets/images/red.png",
blue: { "./assets/images/teal.png",
image: "./assets/images/blue.png", ],
prerendered: true,
},
gray: {
image: "./assets/images/gray.png",
prerendered: true,
},
red: {
image: "./assets/images/red.png",
prerendered: true,
},
teal: {
image: "./assets/images/teal.png",
prerendered: true,
},
},
], ],
[ [
"expo-media-library", "expo-media-library",

View File

@@ -18,7 +18,6 @@
"typecheck": "tsc --noEmit" "typecheck": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@config-plugins/react-native-dynamic-app-icon": "^7.0.0",
"@expo/metro-config": "^0.17.3", "@expo/metro-config": "^0.17.3",
"@movie-web/colors": "*", "@movie-web/colors": "*",
"@movie-web/provider-utils": "*", "@movie-web/provider-utils": "*",
@@ -36,6 +35,7 @@
"burnt": "^0.12.2", "burnt": "^0.12.2",
"class-variance-authority": "^0.7.0", "class-variance-authority": "^0.7.0",
"expo": "~50.0.14", "expo": "~50.0.14",
"expo-alternate-app-icons": "^0.1.7",
"expo-application": "~5.8.3", "expo-application": "~5.8.3",
"expo-av": "~13.10.5", "expo-av": "~13.10.5",
"expo-brightness": "~11.8.0", "expo-brightness": "~11.8.0",
@@ -59,7 +59,6 @@
"react": "18.2.0", "react": "18.2.0",
"react-dom": "18.2.0", "react-dom": "18.2.0",
"react-native": "0.73.6", "react-native": "0.73.6",
"react-native-change-icon": "^5.0.0",
"react-native-context-menu-view": "^1.14.1", "react-native-context-menu-view": "^1.14.1",
"react-native-gesture-handler": "~2.14.1", "react-native-gesture-handler": "~2.14.1",
"react-native-ios-modal": "^0.1.8", "react-native-ios-modal": "^0.1.8",

View File

@@ -1,7 +1,6 @@
import { changeIcon } from "react-native-change-icon";
import { create } from "zustand"; import { create } from "zustand";
import { immer } from "zustand/middleware/immer"; import { immer } from "zustand/middleware/immer";
import { setAlternateAppIcon } from "expo-alternate-app-icons";
import { getTheme, saveTheme } from "~/settings"; import { getTheme, saveTheme } from "~/settings";
export type ThemeStoreOption = "main" | "blue" | "gray" | "red" | "teal"; export type ThemeStoreOption = "main" | "blue" | "gray" | "red" | "teal";
@@ -26,7 +25,7 @@ export const useThemeStore = create(
.then(() => { .then(() => {
set((s) => { set((s) => {
s.theme = newTheme; s.theme = newTheme;
void changeIcon(newTheme); void setAlternateAppIcon(newTheme)
}); });
}) })
.catch((error) => { .catch((error) => {

38
pnpm-lock.yaml generated
View File

@@ -26,9 +26,6 @@ importers:
apps/expo: apps/expo:
dependencies: dependencies:
'@config-plugins/react-native-dynamic-app-icon':
specifier: ^7.0.0
version: 7.0.0(expo@50.0.14)
'@expo/metro-config': '@expo/metro-config':
specifier: ^0.17.3 specifier: ^0.17.3
version: 0.17.3(@react-native/babel-preset@0.73.21) version: 0.17.3(@react-native/babel-preset@0.73.21)
@@ -80,6 +77,9 @@ importers:
expo: expo:
specifier: ~50.0.14 specifier: ~50.0.14
version: 50.0.14(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21) version: 50.0.14(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21)
expo-alternate-app-icons:
specifier: ^0.1.7
version: 0.1.7(expo@50.0.14)(react-native@0.73.6)(react@18.2.0)
expo-application: expo-application:
specifier: ~5.8.3 specifier: ~5.8.3
version: 5.8.3(expo@50.0.14) version: 5.8.3(expo@50.0.14)
@@ -149,9 +149,6 @@ importers:
react-native: react-native:
specifier: 0.73.6 specifier: 0.73.6
version: 0.73.6(@babel/core@7.23.9)(@babel/preset-env@7.23.9)(react@18.2.0) version: 0.73.6(@babel/core@7.23.9)(@babel/preset-env@7.23.9)(react@18.2.0)
react-native-change-icon:
specifier: ^5.0.0
version: 5.0.0(react-native@0.73.6)
react-native-context-menu-view: react-native-context-menu-view:
specifier: ^1.14.1 specifier: ^1.14.1
version: 1.14.1(react-native@0.73.6)(react@18.2.0) version: 1.14.1(react-native@0.73.6)(react@18.2.0)
@@ -1865,15 +1862,6 @@ packages:
'@babel/helper-validator-identifier': 7.22.20 '@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0 to-fast-properties: 2.0.0
/@config-plugins/react-native-dynamic-app-icon@7.0.0(expo@50.0.14):
resolution: {integrity: sha512-ujNXdDCso8HI9KHJIanDMP558mQ43w3YT7mVD82kBxL/WTWQ9tZav7Qu12fzipZkVL4oLDQNrPgbzYRCfZpN6g==}
peerDependencies:
expo: ^50
dependencies:
expo: 50.0.14(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21)
xcode: 3.0.1
dev: false
/@craftzdog/react-native-buffer@6.0.5(react-native@0.73.6)(react@18.2.0): /@craftzdog/react-native-buffer@6.0.5(react-native@0.73.6)(react@18.2.0):
resolution: {integrity: sha512-Av+YqfwA9e7jhgI9GFE/gTpwl/H+dRRLmZyJPOpKTy107j9Oj7oXlm3/YiMNz+C/CEGqcKAOqnXDLs4OL6AAFw==} resolution: {integrity: sha512-Av+YqfwA9e7jhgI9GFE/gTpwl/H+dRRLmZyJPOpKTy107j9Oj7oXlm3/YiMNz+C/CEGqcKAOqnXDLs4OL6AAFw==}
dependencies: dependencies:
@@ -7711,6 +7699,18 @@ packages:
signal-exit: 3.0.7 signal-exit: 3.0.7
strip-final-newline: 2.0.0 strip-final-newline: 2.0.0
/expo-alternate-app-icons@0.1.7(expo@50.0.14)(react-native@0.73.6)(react@18.2.0):
resolution: {integrity: sha512-4hIIGVRaNSedreT2GbujpR+vyz7x+/j8GPfGn/WHFYy8V0lmAOa8KgT2JeXuK1nB6s4Ler4yahrxUhcSI/lmqQ==}
peerDependencies:
expo: '*'
react: '*'
react-native: '*'
dependencies:
expo: 50.0.14(@babel/core@7.23.9)(@react-native/babel-preset@0.73.21)
react: 18.2.0
react-native: 0.73.6(@babel/core@7.23.9)(@babel/preset-env@7.23.9)(react@18.2.0)
dev: false
/expo-application@5.8.3(expo@50.0.14): /expo-application@5.8.3(expo@50.0.14):
resolution: {integrity: sha512-IISxzpPX+Xe4ynnwX8yY52T6dm1g9sME1GCj4lvUlrdc5xeTPM6U35x7Wj82V7lLWBaVGe+/Tg9EeKqfylCEwA==} resolution: {integrity: sha512-IISxzpPX+Xe4ynnwX8yY52T6dm1g9sME1GCj4lvUlrdc5xeTPM6U35x7Wj82V7lLWBaVGe+/Tg9EeKqfylCEwA==}
peerDependencies: peerDependencies:
@@ -11476,14 +11476,6 @@ packages:
prop-types: 15.8.1 prop-types: 15.8.1
dev: false dev: false
/react-native-change-icon@5.0.0(react-native@0.73.6):
resolution: {integrity: sha512-pq2SlMeaRlgEDDlJQL2dAa2P6YpgXpKMmZ4CsXHRnmXBVjpG7SBSI9tbP85grxqZSj6b6EBuP9u1oyfZm2b+JA==}
peerDependencies:
react-native: '*'
dependencies:
react-native: 0.73.6(@babel/core@7.23.9)(@babel/preset-env@7.23.9)(react@18.2.0)
dev: false
/react-native-context-menu-view@1.14.1(react-native@0.73.6)(react@18.2.0): /react-native-context-menu-view@1.14.1(react-native@0.73.6)(react@18.2.0):
resolution: {integrity: sha512-rPtC6RCbEVismTQ6M7WSt1HisNvgbS9bWqWX4RQXNXHKOKsVvXpI+bWRypFAjeBN/P+winn6Dxn1+meLBMrjmQ==} resolution: {integrity: sha512-rPtC6RCbEVismTQ6M7WSt1HisNvgbS9bWqWX4RQXNXHKOKsVvXpI+bWRypFAjeBN/P+winn6Dxn1+meLBMrjmQ==}
peerDependencies: peerDependencies: