diff options
Diffstat (limited to 'src/view/com')
-rw-r--r-- | src/view/com/login/CreateAccount.tsx | 8 | ||||
-rw-r--r-- | src/view/com/login/Signin.tsx | 8 | ||||
-rw-r--r-- | src/view/com/util/LoadingPlaceholder.tsx | 2 | ||||
-rw-r--r-- | src/view/com/util/UserInfoText.tsx | 8 | ||||
-rw-r--r-- | src/view/com/util/ViewHeader.tsx | 2 | ||||
-rw-r--r-- | src/view/com/util/gestures/SwipeAndZoom.tsx | 20 | ||||
-rw-r--r-- | src/view/com/util/text/RichText.tsx | 7 |
7 files changed, 40 insertions, 15 deletions
diff --git a/src/view/com/login/CreateAccount.tsx b/src/view/com/login/CreateAccount.tsx index 279a55f52..349c48ef7 100644 --- a/src/view/com/login/CreateAccount.tsx +++ b/src/view/com/login/CreateAccount.tsx @@ -48,12 +48,16 @@ export const CreateAccount = ({onPressBack}: {onPressBack: () => void}) => { setServiceDescription(undefined) store.session.describeService(serviceUrl).then( desc => { - if (aborted) return + if (aborted) { + return + } setServiceDescription(desc) setUserDomain(desc.availableUserDomains[0]) }, err => { - if (aborted) return + if (aborted) { + return + } store.log.warn( `Failed to fetch service description for ${serviceUrl}`, err, diff --git a/src/view/com/login/Signin.tsx b/src/view/com/login/Signin.tsx index f60b637b7..e99aaa651 100644 --- a/src/view/com/login/Signin.tsx +++ b/src/view/com/login/Signin.tsx @@ -47,11 +47,15 @@ export const Signin = ({onPressBack}: {onPressBack: () => void}) => { setError('') store.session.describeService(serviceUrl).then( desc => { - if (aborted) return + if (aborted) { + return + } setServiceDescription(desc) }, err => { - if (aborted) return + if (aborted) { + return + } store.log.warn( `Failed to fetch service description for ${serviceUrl}`, err, diff --git a/src/view/com/util/LoadingPlaceholder.tsx b/src/view/com/util/LoadingPlaceholder.tsx index b51191bd9..207a3f5d2 100644 --- a/src/view/com/util/LoadingPlaceholder.tsx +++ b/src/view/com/util/LoadingPlaceholder.tsx @@ -76,7 +76,7 @@ export function PostLoadingPlaceholder({ strokeWidth={1.7} /> </View> - <View style={s.flex1}></View> + <View style={s.flex1} /> </View> </View> </View> diff --git a/src/view/com/util/UserInfoText.tsx b/src/view/com/util/UserInfoText.tsx index db6696a9b..5cdfd1345 100644 --- a/src/view/com/util/UserInfoText.tsx +++ b/src/view/com/util/UserInfoText.tsx @@ -40,11 +40,15 @@ export function UserInfoText({ let aborted = false store.profiles.getProfile(did).then( v => { - if (aborted) return + if (aborted) { + return + } setProfile(v.data) }, _err => { - if (aborted) return + if (aborted) { + return + } setFailed(true) }, ) diff --git a/src/view/com/util/ViewHeader.tsx b/src/view/com/util/ViewHeader.tsx index 230273709..d1e9b397b 100644 --- a/src/view/com/util/ViewHeader.tsx +++ b/src/view/com/util/ViewHeader.tsx @@ -36,7 +36,7 @@ export const ViewHeader = observer(function ViewHeader({ store.shell.setMainMenuOpen(true) } const onPressSearch = () => { - store.nav.navigate(`/search`) + store.nav.navigate('/search') } const onPressReconnect = () => { store.session.connect().catch(e => { diff --git a/src/view/com/util/gestures/SwipeAndZoom.tsx b/src/view/com/util/gestures/SwipeAndZoom.tsx index dc3a9f54c..881eea094 100644 --- a/src/view/com/util/gestures/SwipeAndZoom.tsx +++ b/src/view/com/util/gestures/SwipeAndZoom.tsx @@ -88,11 +88,21 @@ export function SwipeAndZoom({ } const canDir = (d: Dir) => { - if (d === Dir.Left) return canSwipeLeft - if (d === Dir.Right) return canSwipeRight - if (d === Dir.Up) return canSwipeUp - if (d === Dir.Down) return canSwipeDown - if (d === Dir.Zoom) return zoomEnabled + if (d === Dir.Left) { + return canSwipeLeft + } + if (d === Dir.Right) { + return canSwipeRight + } + if (d === Dir.Up) { + return canSwipeUp + } + if (d === Dir.Down) { + return canSwipeDown + } + if (d === Dir.Zoom) { + return zoomEnabled + } return false } const isHorz = (d: Dir) => d === Dir.Left || d === Dir.Right diff --git a/src/view/com/util/text/RichText.tsx b/src/view/com/util/text/RichText.tsx index a7bc92a45..f04f4566d 100644 --- a/src/view/com/util/text/RichText.tsx +++ b/src/view/com/util/text/RichText.tsx @@ -46,8 +46,11 @@ export function RichText({ </Text> ) } - if (!style) style = [] - else if (!Array.isArray(style)) style = [style] + if (!style) { + style = [] + } else if (!Array.isArray(style)) { + style = [style] + } entities.sort(sortByIndex) const segments = Array.from(toSegments(text, entities)) const els = [] |