1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Merge branch 'main' into candidate

This commit is contained in:
xmflsct
2023-02-09 14:34:07 +01:00
2 changed files with 4 additions and 7 deletions

View File

@ -164,11 +164,10 @@ const TabMePush: React.FC = () => {
url: `push/unsubscribe/${pushPath}` url: `push/unsubscribe/${pushPath}`
}) })
setAccountStorage([{ key: 'push', value: { ...push, global: false } }])
if (Platform.OS === 'android') { if (Platform.OS === 'android') {
Notifications.deleteNotificationChannelGroupAsync(accountFull) Notifications.deleteNotificationChannelGroupAsync(accountFull)
} }
setAccountStorage([{ key: 'push', value: { ...push, global: false } }])
} else { } else {
// Fix a bug for some users of v4.8.0 // Fix a bug for some users of v4.8.0
let authKey = push.key let authKey = push.key
@ -182,7 +181,7 @@ const TabMePush: React.FC = () => {
const body: { const body: {
subscription: any subscription: any
alerts: Mastodon.PushSubscription['alerts'] data: { alerts: Mastodon.PushSubscription['alerts'] }
} = { } = {
subscription: { subscription: {
endpoint, endpoint,
@ -192,7 +191,7 @@ const TabMePush: React.FC = () => {
auth: authKey auth: authKey
} }
}, },
alerts: push.alerts data: { alerts: push.alerts }
} }
const res = await apiInstance<Mastodon.PushSubscription>({ const res = await apiInstance<Mastodon.PushSubscription>({
@ -239,7 +238,6 @@ const TabMePush: React.FC = () => {
setAccountStorage([ setAccountStorage([
{ key: 'push', value: { ...push, global: true, key: authKey } } { key: 'push', value: { ...push, global: true, key: authKey } }
]) ])
if (Platform.OS === 'android') { if (Platform.OS === 'android') {
setChannels(true) setChannels(true)
} }

View File

@ -50,9 +50,8 @@ const ScreenTabs = () => {
return <Icon name='bell' size={size} color={color} /> return <Icon name='bell' size={size} color={color} />
case 'Tab-Me': case 'Tab-Me':
return ( return (
<View style={{ flexDirection: 'row', alignItems: 'center' }}> <View key={avatarStatic} style={{ flexDirection: 'row', alignItems: 'center' }}>
<GracefullyImage <GracefullyImage
key={accountActive}
sources={{ default: { uri: avatarStatic } }} sources={{ default: { uri: avatarStatic } }}
dimension={{ width: size, height: size }} dimension={{ width: size, height: size }}
style={{ style={{