mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update `@mozzius/expo-dynamic-app-icon` (#8834)

authored by samuel.fm and committed by

GitHub ce2604d0 c2819506

+32 -26
+5
app.config.js
··· 303 303 android: './assets/app-icons/android_icon_default_dark.png', 304 304 prerendered: true, 305 305 }, 306 + next: { 307 + ios: './assets/app-icons/icon_default_next.png', 308 + android: './assets/app-icons/icon_default_next.png', 309 + prerendered: true, 310 + }, 306 311 307 312 /** 308 313 * Bluesky+ core set
assets/app-icons/icon_default_next.png

This is a binary file and will not be displayed.

+1 -1
package.json
··· 92 92 "@lingui/react": "^4.14.1", 93 93 "@mattermost/react-native-paste-input": "mattermost/react-native-paste-input", 94 94 "@miblanchard/react-native-slider": "^2.6.0", 95 - "@mozzius/expo-dynamic-app-icon": "1.5.0", 95 + "@mozzius/expo-dynamic-app-icon": "^1.7.1", 96 96 "@react-native-async-storage/async-storage": "2.1.2", 97 97 "@react-native-menu/menu": "^1.2.3", 98 98 "@react-native-picker/picker": "2.11.0",
+8 -8
src/screens/Settings/AppIconSettings/index.tsx
··· 28 28 getAppIconName(DynamicAppIcon.getAppIcon()), 29 29 ) 30 30 31 - const onSetAppIcon = (icon: string) => { 31 + const onSetAppIcon = (icon: DynamicAppIcon.IconName) => { 32 32 if (isAndroid) { 33 33 const next = 34 34 sets.defaults.find(i => i.id === icon) ?? ··· 37 37 next 38 38 ? _(msg`Change app icon to "${next.name}"`) 39 39 : _(msg`Change app icon`), 40 - // to determine - can we stop this happening? -sfn 40 + // unfortunately necessary -sfn 41 41 _(msg`The app will be restarted`), 42 42 [ 43 43 { ··· 119 119 ) 120 120 } 121 121 122 - function setAppIcon(icon: string) { 122 + function setAppIcon(icon: DynamicAppIcon.IconName) { 123 123 if (icon === 'default_light') { 124 124 return getAppIconName(DynamicAppIcon.setAppIcon(null)) 125 125 } else { ··· 127 127 } 128 128 } 129 129 130 - function getAppIconName(icon: string | false) { 130 + function getAppIconName(icon: string | false): DynamicAppIcon.IconName { 131 131 if (!icon || icon === 'DEFAULT') { 132 132 return 'default_light' 133 133 } else { 134 - return icon 134 + return icon as DynamicAppIcon.IconName 135 135 } 136 136 } 137 137 ··· 143 143 }: { 144 144 children: React.ReactNode 145 145 label: string 146 - value: string 147 - onChange: (value: string) => void 146 + value: DynamicAppIcon.IconName 147 + onChange: (value: DynamicAppIcon.IconName) => void 148 148 }) { 149 149 return ( 150 150 <Toggle.Group ··· 153 153 values={[value]} 154 154 maxSelections={1} 155 155 onChange={vals => { 156 - if (vals[0]) onChange(vals[0]) 156 + if (vals[0]) onChange(vals[0] as DynamicAppIcon.IconName) 157 157 }}> 158 158 <View style={[a.flex_1, a.rounded_md, a.overflow_hidden]}> 159 159 {children}
+3 -2
src/screens/Settings/AppIconSettings/types.ts
··· 1 - import {ImageSourcePropType} from 'react-native' 1 + import {type ImageSourcePropType} from 'react-native' 2 + import type * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon' 2 3 3 4 export type AppIconSet = { 4 - id: string 5 + id: DynamicAppIcon.IconName 5 6 name: string 6 7 iosImage: () => ImageSourcePropType 7 8 androidImage: () => ImageSourcePropType
+10
src/screens/Settings/AppIconSettings/useAppIconSets.ts
··· 37 37 ) 38 38 }, 39 39 }, 40 + { 41 + id: 'next', 42 + name: _(msg({context: 'Name of app icon variant', message: 'Next'})), 43 + iosImage: () => { 44 + return require(`../../../../assets/app-icons/icon_default_next.png`) 45 + }, 46 + androidImage: () => { 47 + return require(`../../../../assets/app-icons/icon_default_next.png`) 48 + }, 49 + }, 40 50 ] satisfies AppIconSet[] 41 51 42 52 /**
+1 -3
src/screens/Settings/AppearanceSettings.tsx
··· 12 12 type CommonNavigatorParams, 13 13 type NativeStackScreenProps, 14 14 } from '#/lib/routes/types' 15 - import {useGate} from '#/lib/statsig/statsig' 16 15 import {isNative} from '#/platform/detection' 17 16 import {useSetThemePrefs, useThemePrefs} from '#/state/shell' 18 17 import {SettingsListItem as AppIconSettingsListItem} from '#/screens/Settings/AppIconSettings/SettingsListItem' ··· 32 31 export function AppearanceSettingsScreen({}: Props) { 33 32 const {_} = useLingui() 34 33 const {fonts} = useAlf() 35 - const gate = useGate() 36 34 37 35 const {colorMode, darkTheme} = useThemePrefs() 38 36 const {setColorMode, setDarkTheme} = useSetThemePrefs() ··· 180 178 onChange={onChangeFontScale} 181 179 /> 182 180 183 - {isNative && IS_INTERNAL && gate('debug_subscriptions') && ( 181 + {isNative && IS_INTERNAL && ( 184 182 <> 185 183 <SettingsList.Divider /> 186 184 <AppIconSettingsListItem />
+4 -12
yarn.lock
··· 5134 5134 resolved "https://registry.yarnpkg.com/@miblanchard/react-native-slider/-/react-native-slider-2.6.0.tgz#9f78c805d637ffaff0e3e7429932d2995a67edc9" 5135 5135 integrity sha512-o7hk/f/8vkqh6QNR5L52m+ws846fQeD/qNCC9CCSRdBqjq66KiCgbxzlhRzKM/gbtxcvMYMIEEJ1yes5cr6I3A== 5136 5136 5137 - "@mozzius/expo-dynamic-app-icon@1.5.0": 5138 - version "1.5.0" 5139 - resolved "https://registry.yarnpkg.com/@mozzius/expo-dynamic-app-icon/-/expo-dynamic-app-icon-1.5.0.tgz#c5f88c309965b6d6b89cfd5e2c00faa7bda736af" 5140 - integrity sha512-yE2yEPO+HQmOqsX7cECh7/vu/LXnqhHGsVm3UiVi/3gaK8u5hAkPTNzZ0Qu6vnMwjPnY+uFbN6X+6Aj9c9yjMQ== 5137 + "@mozzius/expo-dynamic-app-icon@^1.7.1": 5138 + version "1.7.1" 5139 + resolved "https://registry.yarnpkg.com/@mozzius/expo-dynamic-app-icon/-/expo-dynamic-app-icon-1.7.1.tgz#20a6475af256ab93112bbaac1c2f3dd052562d16" 5140 + integrity sha512-zDcY11B3tsQ9WsPTcszUCa6SpygfYz1e4p8PGn/4XhwYbOHJ53sEnGVQ1YlwzQ87SeWPlqrfzY6SUr9GpNq2Kg== 5141 5141 dependencies: 5142 5142 "@expo/image-utils" "^0.6.3" 5143 - expo-modules-core "^2.1.1" 5144 5143 xcode "^3.0.1" 5145 5144 5146 5145 "@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": ··· 11377 11376 version "2.4.0" 11378 11377 resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-2.4.0.tgz#3081d62fadff913090cc5abfe46d9ec6b0e75789" 11379 11378 integrity sha512-Ko5eHBdvuMykjw9P9C9PF54/wBSsGOxaOjx92I5BwgKvEmUwN3UrXFV4CXzlLVbLfSYUQaLcB220xmPfgvT7Fg== 11380 - dependencies: 11381 - invariant "^2.2.4" 11382 - 11383 - expo-modules-core@^2.1.1: 11384 - version "2.1.1" 11385 - resolved "https://registry.yarnpkg.com/expo-modules-core/-/expo-modules-core-2.1.1.tgz#970af4cfd70c8aa6fc0096dd0a6578aa003a479f" 11386 - integrity sha512-yQzYCLR2mre4BNMXuqkeJ0oSNgmGEMI6BcmIzeNZbC2NFEjiaDpKvlV9bclYCtyVhUEVNbJcEPYMr6c1Y4eR4w== 11387 11379 dependencies: 11388 11380 invariant "^2.2.4" 11389 11381