An ATproto social media client -- with an independent Appview.
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fixes character counter missing on web (#300) (#322)

authored by

John Fawcett and committed by
GitHub
ea2b2583 30c54aa2

-39
-39
src/view/com/composer/char-progress/CharProgress.web.tsx
··· 1 - import React from 'react' 2 - import {View} from 'react-native' 3 - import {Text} from '../../util/text/Text' 4 - import {s} from 'lib/styles' 5 - 6 - const MAX_TEXT_LENGTH = 256 7 - const DANGER_TEXT_LENGTH = MAX_TEXT_LENGTH 8 - 9 - export function CharProgress({count}: {count: number}) { 10 - const progressColor = count > DANGER_TEXT_LENGTH ? '#e60000' : undefined 11 - return ( 12 - <> 13 - <Text style={[s.mr10, {color: progressColor}]}> 14 - {MAX_TEXT_LENGTH - count} 15 - </Text> 16 - <View> 17 - { 18 - null /* TODO count > DANGER_TEXT_LENGTH ? ( 19 - <ProgressPie 20 - size={30} 21 - borderWidth={4} 22 - borderColor={progressColor} 23 - color={progressColor} 24 - progress={Math.min((count - MAX_TEXT_LENGTH) / MAX_TEXT_LENGTH, 1)} 25 - /> 26 - ) : ( 27 - <ProgressCircle 28 - size={30} 29 - borderWidth={1} 30 - borderColor={colors.gray2} 31 - color={progressColor} 32 - progress={count / MAX_TEXT_LENGTH} 33 - /> 34 - )*/ 35 - } 36 - </View> 37 - </> 38 - ) 39 - }