Remove icon change functionality

This commit is contained in:
minibits-cash
2024-10-01 22:56:17 +02:00
parent 19e7874b27
commit 6d9d6939f1
4 changed files with 49 additions and 83 deletions
+1 -1
View File
@@ -96,7 +96,7 @@ android {
applicationId "com.minibits_wallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 58010
versionCode 58011
versionName "0.1.9"
}
+42 -57
View File
@@ -11,62 +11,47 @@
android:supportsRtl="true"
android:usesCleartextTraffic="true"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="lightning"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="lnurlw"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="lnurlp"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<category android:name="android.intent.category.DEFAULT"/>
<data android:scheme="cashu"/>
</intent-filter>
</activity>
<activity-alias
android:name=".MainActivityDefault"
android:enabled="true"
android:exported="true"
android:icon="@mipmap/ic_launcher"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>
<activity-alias
android:name=".MainActivityGolden"
android:enabled="false"
android:exported="true"
android:icon="@mipmap/ic_launcher_golden"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity-alias>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="lightning" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="lnurlw" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="lnurlp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="cashu" />
</intent-filter>
</activity>
</application>
</manifest>
+2 -3
View File
@@ -1,6 +1,6 @@
{
"name": "minibits_wallet",
"version": "0.1.9-beta.10",
"version": "0.1.9-beta.11",
"private": true,
"scripts": {
"android:clean": "cd android && ./gradlew clean",
@@ -37,8 +37,7 @@
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"@react-navigation/stack": "^6.4.1",
"@sentry/react-native": "^5.32.0",
"@synonymdev/react-native-change-icon": "^5.0.0",
"@sentry/react-native": "^5.32.0",
"date-fns": "^4.0.0",
"i18n-js": "^4.4.3",
"js-lnurl": "^0.6.0",
+4 -22
View File
@@ -9,7 +9,6 @@ import {
CODEPUSH_PRODUCTION_DEPLOYMENT_KEY,
} from '@env'
import codePush, { RemotePackage } from 'react-native-code-push'
import { changeIcon, getIcon, resetIcon } from '@synonymdev/react-native-change-icon'
import {ThemeCode, Themes, colors, spacing, useThemeColor} from '../theme'
import {SettingsStackScreenProps} from '../navigation' // @demo remove-current-line
import {ListItem, Screen, Text, Card, NwcIcon, Button, BottomModal, InfoModal, Icon} from '../components'
@@ -234,31 +233,14 @@ export const SettingsScreen: FC<SettingsScreenProps> = observer(
const onSelectTheme = async function(theme: ThemeCode) {
if(currentTheme !== theme) {
try {
// state update causes crash because of hooks
Database.updateUserSettings({...userSettingsStore, theme})
setCurrentTheme(theme)
const currentIcon = await getIcon()
log.trace('[onSelectTheme]', {currentIcon})
if(theme === ThemeCode.GOLDEN) {
await changeIcon('Golden')
const updatedIcon = await getIcon()
log.trace('[onSelectTheme]', {updatedIcon})
}
if(currentIcon !== 'Default') {
await changeIcon('Default')
const updatedIcon = await getIcon()
log.trace('[onSelectTheme]', {updatedIcon})
}
setInfo('Restart the wallet to apply new theme.')
// state update causes crash because of hooks
Database.updateUserSettings({...userSettingsStore, theme})
setCurrentTheme(theme)
setInfo('Restart the wallet to apply new theme.')
} catch (e: any) {
log.warn('[onSelectTheme]', e.message)
}
}
toggleThemeModal()
}