about summary refs log tree commit diff
path: root/src/view/shell
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2023-11-30 17:03:38 -0800
committerGitHub <noreply@github.com>2023-11-30 17:03:38 -0800
commit23ad3ad98b5b4c76ceb06bd4d4cffb9e5b42d087 (patch)
tree9a332e6287ab34fa74bb0ad234b80c1b25a8ebfa /src/view/shell
parent5839d2a30ca19499617190970e7a6376f3724df5 (diff)
downloadvoidsky-23ad3ad98b5b4c76ceb06bd4d4cffb9e5b42d087.tar.zst
Various fixes (#2053)
* Fix invite code translations (plural api not availabe in ios)

* Speed up the composer animation a smidge
Diffstat (limited to 'src/view/shell')
-rw-r--r--src/view/shell/Composer.web.tsx4
-rw-r--r--src/view/shell/Drawer.tsx19
2 files changed, 8 insertions, 15 deletions
diff --git a/src/view/shell/Composer.web.tsx b/src/view/shell/Composer.web.tsx
index d8f4648fe..73f9f540e 100644
--- a/src/view/shell/Composer.web.tsx
+++ b/src/view/shell/Composer.web.tsx
@@ -25,10 +25,10 @@ export function Composer({}: {winHeight: number}) {
       style={styles.mask}
       aria-modal
       accessibilityViewIsModal
-      entering={FadeIn.duration(150)}
+      entering={FadeIn.duration(100)}
       exiting={FadeOut}>
       <Animated.View
-        entering={FadeInDown.duration(200)}
+        entering={FadeInDown.duration(150)}
         exiting={FadeOut}
         style={[
           styles.container,
diff --git a/src/view/shell/Drawer.tsx b/src/view/shell/Drawer.tsx
index a72f3fe36..b4710c2e1 100644
--- a/src/view/shell/Drawer.tsx
+++ b/src/view/shell/Drawer.tsx
@@ -41,8 +41,8 @@ import {getTabState, TabState} from 'lib/routes/helpers'
 import {NavigationProp} from 'lib/routes/types'
 import {useNavigationTabState} from 'lib/hooks/useNavigationTabState'
 import {isWeb} from 'platform/detection'
-import {formatCount, formatCountShortOnly} from 'view/com/util/numeric/format'
-import {Plural, Trans, msg, plural} from '@lingui/macro'
+import {formatCountShortOnly} from 'view/com/util/numeric/format'
+import {Trans, msg} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 import {useSetDrawerOpen} from '#/state/shell'
 import {useModalControls} from '#/state/modals'
@@ -500,12 +500,7 @@ function InviteCodes({style}: {style?: StyleProp<ViewStyle>}) {
       style={[styles.inviteCodes, style]}
       onPress={onPress}
       accessibilityRole="button"
-      accessibilityLabel={_(
-        plural(invitesAvailable, {
-          one: 'Invite codes: # available',
-          other: 'Invite codes: # available',
-        }),
-      )}
+      accessibilityLabel={_(msg`Invite codes: ${invitesAvailable} available`)}
       accessibilityHint={_(msg`Opens list of invite codes`)}
       disabled={invites?.disabled}>
       <FontAwesomeIcon
@@ -523,12 +518,10 @@ function InviteCodes({style}: {style?: StyleProp<ViewStyle>}) {
           <Trans>
             Your invite codes are hidden when logged in using an App Password
           </Trans>
+        ) : invitesAvailable === 1 ? (
+          <Trans>{invitesAvailable} invite code available</Trans>
         ) : (
-          <Plural
-            value={formatCount(invitesAvailable)}
-            one="# invite code available"
-            other="# invite codes available"
-          />
+          <Trans>{invitesAvailable} invite codes available</Trans>
         )}
       </Text>
     </TouchableOpacity>