Merge branch 'main' into ansh/app-812-add-custom-feed-discovery-to-onboarding

This commit is contained in:
Ansh Nanda 2023-08-25 14:53:03 -07:00
commit 0ca28ccca6
8 changed files with 17 additions and 11 deletions

View file

@ -9,6 +9,7 @@ module.exports = {
plugins: ['@typescript-eslint', 'detox'], plugins: ['@typescript-eslint', 'detox'],
ignorePatterns: [ ignorePatterns: [
'**/__mocks__/*.ts', '**/__mocks__/*.ts',
'src/platform/polyfills.ts',
'src/third-party', 'src/third-party',
'ios', 'ios',
'android', 'android',
@ -25,6 +26,7 @@ module.exports = {
files: ['*.js', '*.mjs', '*.ts', '*.tsx'], files: ['*.js', '*.mjs', '*.ts', '*.tsx'],
rules: { rules: {
semi: [2, 'never'], semi: [2, 'never'],
'react-native/no-inline-styles': 0,
}, },
}, },
], ],

View file

@ -316,9 +316,9 @@ function CustomHandleForm({
// events // events
// = // =
const onPressCopy = React.useCallback(() => { const onPressCopy = React.useCallback(() => {
Clipboard.setString(`did=${store.me.did}`) Clipboard.setString(isDNSForm ? `did=${store.me.did}` : store.me.did)
Toast.show('Copied to clipboard') Toast.show('Copied to clipboard')
}, [store.me.did]) }, [store.me.did, isDNSForm])
const onChangeHandle = React.useCallback( const onChangeHandle = React.useCallback(
(v: string) => { (v: string) => {
setHandle(v) setHandle(v)
@ -410,11 +410,11 @@ function CustomHandleForm({
{isDNSForm ? ( {isDNSForm ? (
<> <>
<Text type="md" style={[pal.text, s.pb5, s.pl5]}> <Text type="md" style={[pal.text, s.pb5, s.pl5]}>
Add the following record to your domain: Add the following DNS record to your domain:
</Text> </Text>
<View style={[styles.dnsTable, pal.btn]}> <View style={[styles.dnsTable, pal.btn]}>
<Text type="md-medium" style={[styles.dnsLabel, pal.text]}> <Text type="md-medium" style={[styles.dnsLabel, pal.text]}>
Domain: Host:
</Text> </Text>
<View style={[styles.dnsValue]}> <View style={[styles.dnsValue]}>
<Text type="mono" style={[styles.monoText, pal.text]}> <Text type="mono" style={[styles.monoText, pal.text]}>

View file

@ -118,10 +118,10 @@ function Modal({modal}: {modal: ModalIface}) {
} }
return ( return (
// eslint-disable-next-line // eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors
<TouchableWithoutFeedback onPress={onPressMask}> <TouchableWithoutFeedback onPress={onPressMask}>
<View style={styles.mask}> <View style={styles.mask}>
{/* eslint-disable-next-line */} {/* eslint-disable-next-line react-native-a11y/has-valid-accessibility-descriptors */}
<TouchableWithoutFeedback onPress={onInnerPress}> <TouchableWithoutFeedback onPress={onInnerPress}>
<View <View
style={[ style={[

View file

@ -21,7 +21,7 @@ export const Component = observer(({did}: {did: string}) => {
const {screen} = useAnalytics() const {screen} = useAnalytics()
// track the navigator state to detect if a page-load occurred // track the navigator state to detect if a page-load occurred
const navState = useNavigationState(s => s) const navState = useNavigationState(state => state)
const [initNavState] = useState(navState) const [initNavState] = useState(navState)
const isLoading = initNavState !== navState const isLoading = initNavState !== navState

View file

@ -3,10 +3,12 @@ import {AlertButton, AlertStatic} from 'react-native'
class WebAlert implements Pick<AlertStatic, 'alert'> { class WebAlert implements Pick<AlertStatic, 'alert'> {
public alert(title: string, message?: string, buttons?: AlertButton[]): void { public alert(title: string, message?: string, buttons?: AlertButton[]): void {
if (buttons === undefined || buttons.length === 0) { if (buttons === undefined || buttons.length === 0) {
// eslint-disable-next-line no-alert
window.alert([title, message].filter(Boolean).join('\n')) window.alert([title, message].filter(Boolean).join('\n'))
return return
} }
// eslint-disable-next-line no-alert
const result = window.confirm([title, message].filter(Boolean).join('\n')) const result = window.confirm([title, message].filter(Boolean).join('\n'))
if (result === true) { if (result === true) {

View file

@ -174,8 +174,8 @@ export function Selector({
<View <View
style={[pal.view, styles.outer]} style={[pal.view, styles.outer]}
onLayout={e => { onLayout={e => {
const {height} = e.nativeEvent.layout const {height: layoutHeight} = e.nativeEvent.layout
setHeight(height || 60) setHeight(layoutHeight || 60)
}}> }}>
{items.map((item, i) => { {items.map((item, i) => {
const selected = i === selectedIndex const selected = i === selectedIndex

View file

@ -92,7 +92,9 @@ export const ProfileScreen = withAuthRequired(
const onPressCompose = React.useCallback(() => { const onPressCompose = React.useCallback(() => {
track('ProfileScreen:PressCompose') track('ProfileScreen:PressCompose')
store.shell.openComposer({mention: uiState.profile.handle}) const mention =
uiState.profile.handle === store.me.handle ? '' : uiState.profile.handle
store.shell.openComposer({mention})
}, [store, track, uiState]) }, [store, track, uiState])
const onSelectView = React.useCallback( const onSelectView = React.useCallback(
(index: number) => { (index: number) => {

View file

@ -59,9 +59,9 @@ const styles = StyleSheet.create({
height: '100%', height: '100%',
backgroundColor: '#000c', backgroundColor: '#000c',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center',
}, },
container: { container: {
marginTop: 50,
maxWidth: 600, maxWidth: 600,
width: '100%', width: '100%',
paddingVertical: 0, paddingVertical: 0,