Merge remote-tracking branch 'origin/main' into app-1715
* origin/main: WSOD when trying to create account from starter pack on non-default provider (#10970) Use correct param name for setup-bundletool action (#11020)
This commit is contained in:
@@ -136,7 +136,7 @@ jobs:
|
|||||||
- name: 🔧 Setup bundletool
|
- name: 🔧 Setup bundletool
|
||||||
uses: amyu/setup-bundletool@cc2e1857284660bd625e43f2c8a45626f034302f # v1.1
|
uses: amyu/setup-bundletool@cc2e1857284660bd625e43f2c8a45626f034302f # v1.1
|
||||||
with:
|
with:
|
||||||
bundletool-version: "1.17.2"
|
version: "1.18.3"
|
||||||
|
|
||||||
- name: 🔑 Decode keystore
|
- name: 🔑 Decode keystore
|
||||||
run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode >
|
run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode >
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ jobs:
|
|||||||
- name: 🔧 Setup bundletool
|
- name: 🔧 Setup bundletool
|
||||||
uses: amyu/setup-bundletool@cc2e1857284660bd625e43f2c8a45626f034302f # v1.1
|
uses: amyu/setup-bundletool@cc2e1857284660bd625e43f2c8a45626f034302f # v1.1
|
||||||
with:
|
with:
|
||||||
bundletool-version: "1.17.2"
|
version: "1.18.3"
|
||||||
|
|
||||||
- name: 🔑 Decode keystore
|
- name: 🔑 Decode keystore
|
||||||
run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode >
|
run: echo "${{ secrets.ANDROID_KEYSTORE_BASE64 }}" | base64 --decode >
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
import {createContext, useContext, useState} from 'react'
|
import {
|
||||||
|
createContext,
|
||||||
|
type Dispatch,
|
||||||
|
type SetStateAction,
|
||||||
|
useContext,
|
||||||
|
useState,
|
||||||
|
} from 'react'
|
||||||
|
|
||||||
import {logger} from '#/logger'
|
import {logger} from '#/logger'
|
||||||
|
|
||||||
@@ -16,11 +22,11 @@ type GroupChatJoinRequestLanding = {
|
|||||||
|
|
||||||
type LandingType = StarterPackLanding | GroupChatJoinRequestLanding | undefined
|
type LandingType = StarterPackLanding | GroupChatJoinRequestLanding | undefined
|
||||||
|
|
||||||
type SetContext = (v: LandingType) => void
|
type SetContext = Dispatch<SetStateAction<LandingType>>
|
||||||
|
|
||||||
const stateContext = createContext<LandingType>(undefined)
|
const stateContext = createContext<LandingType>(undefined)
|
||||||
stateContext.displayName = 'ActiveLandingStateContext'
|
stateContext.displayName = 'ActiveLandingStateContext'
|
||||||
const setContext = createContext<SetContext>((_: LandingType) => {})
|
const setContext = createContext<SetContext>(() => {})
|
||||||
setContext.displayName = 'ActiveLandingSetContext'
|
setContext.displayName = 'ActiveLandingSetContext'
|
||||||
|
|
||||||
export function Provider({children}: {children: React.ReactNode}) {
|
export function Provider({children}: {children: React.ReactNode}) {
|
||||||
@@ -45,17 +51,18 @@ export const useActiveStarterPack = () => {
|
|||||||
|
|
||||||
export const useSetActiveStarterPack = () => {
|
export const useSetActiveStarterPack = () => {
|
||||||
const setLanding = useSetActiveLanding()
|
const setLanding = useSetActiveLanding()
|
||||||
const currentLanding = useActiveLanding()
|
|
||||||
return (pack: {uri: string; isClip?: boolean} | undefined) => {
|
return (pack: {uri: string; isClip?: boolean} | undefined) => {
|
||||||
if (!pack) {
|
if (!pack) {
|
||||||
setLanding(undefined)
|
setLanding(undefined)
|
||||||
} else {
|
} else {
|
||||||
|
setLanding(currentLanding => {
|
||||||
if (currentLanding && currentLanding.type !== 'starterpack') {
|
if (currentLanding && currentLanding.type !== 'starterpack') {
|
||||||
logger.debug(
|
logger.debug(
|
||||||
`[landing] Replacing ${currentLanding.type} landing with starterpack`,
|
`[landing] Replacing ${currentLanding.type} landing with starterpack`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
setLanding({type: 'starterpack', ...pack})
|
return {type: 'starterpack', ...pack}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user