Skip to content

Commit 839b2d5

Browse files
authored
1 parent c6d550d commit 839b2d5

11 files changed

Lines changed: 49 additions & 17 deletions

File tree

‎shared/chat/conversation/messages/message-popup/exploding-header.tsx‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,10 @@ class ExplodingPopupHeader extends React.Component<Props, State> {
4141
}
4242

4343
render() {
44-
const {author, botUsername, deviceName, deviceRevokedAt, hideTimer, timestamp, yourMessage} = this.props
45-
const whoRevoked = yourMessage ? 'You' : author
44+
const {author, botUsername, deviceName, deviceRevokedAt, hideTimer, timestamp} = this.props
4645
const icon = <Kb.Icon style={styles.headerIcon} type={headerIconType} />
4746
const info = (
48-
<Kb.Box2 direction="vertical" style={styles.messageInfoContainer}>
47+
<Kb.Box2 direction="vertical" style={styles.messageInfoContainer} fullWidth={true}>
4948
<Kb.Box2 direction="horizontal">
5049
<Kb.Box2 direction="horizontal" gap="xtiny" gapStart={true} style={styles.user}>
5150
<Kb.Avatar username={author} size={16} onClick="profile" />
@@ -78,7 +77,7 @@ class ExplodingPopupHeader extends React.Component<Props, State> {
7877
</Kb.Box2>
7978
</Kb.Box2>
8079
) : null}
81-
<Kb.Box2 direction="horizontal">
80+
<Kb.Box2 direction="vertical" fullWidth={true}>
8281
<Kb.Text center={true} type="BodySmall">
8382
{formatTimeForPopup(timestamp)}
8483
</Kb.Text>
@@ -88,7 +87,7 @@ class ExplodingPopupHeader extends React.Component<Props, State> {
8887
backgroundColor={Kb.Styles.globalColors.blue}
8988
style={styles.revokedAt}
9089
>
91-
{whoRevoked} revoked this device on {formatTimeForRevoked(deviceRevokedAt)}.
90+
Device revoked on {formatTimeForRevoked(deviceRevokedAt)}
9291
</Kb.PopupHeaderText>
9392
) : null}
9493
</Kb.Box2>
@@ -172,9 +171,6 @@ const styles = Kb.Styles.styleSheetCreate(
172171
revokedAt: {
173172
borderBottomLeftRadius: 3,
174173
borderBottomRightRadius: 3,
175-
marginBottom: -Kb.Styles.globalMargins.small,
176-
marginTop: Kb.Styles.globalMargins.small,
177-
minHeight: 40,
178174
width: '100%',
179175
},
180176
timerBox: Kb.Styles.platformStyles({

‎shared/chat/conversation/messages/wrapper/exploding-height-retainer/index.d.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export type Props = {
77
messageKey: string
88
style?: Styles.StylesCrossPlatform
99
retainHeight: boolean
10+
forceAsh: boolean
1011
}
1112
export declare const animationDuration: number
1213

‎shared/chat/conversation/messages/wrapper/exploding-height-retainer/index.desktop.tsx‎

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,36 @@ class ExplodingHeightRetainer extends React.PureComponent<Props, State> {
9494
doneExploding={!this.state.animating}
9595
exploded={this.props.retainHeight}
9696
explodedBy={this.props.explodedBy}
97+
forceAsh={this.props.forceAsh}
9798
height={this.state.height}
9899
/>
99100
</Kb.Box2Measure>
100101
)
101102
}
102103
}
103104

104-
const Ashes = (props: {doneExploding: boolean; exploded: boolean; explodedBy?: string; height: number}) => {
105-
const {doneExploding, explodedBy, exploded, height} = props
105+
const Ashes = (props: {
106+
forceAsh: boolean
107+
doneExploding: boolean
108+
exploded: boolean
109+
explodedBy?: string
110+
height: number
111+
}) => {
112+
const {doneExploding, explodedBy, exploded, height, forceAsh} = props
106113
let explodedTag: React.ReactNode = null
107-
if (doneExploding) {
114+
if (forceAsh) {
115+
explodedTag = (
116+
<Kb.Text
117+
type="BodyTiny"
118+
style={styles.exploded}
119+
virtualText={true}
120+
title="Exploding message sent before this device was provisioned"
121+
>
122+
Unavailable
123+
</Kb.Text>
124+
)
125+
}
126+
if (!explodedTag && doneExploding) {
108127
explodedTag = explodedBy ? (
109128
<Kb.Text type="BodyTiny" style={styles.exploded}>
110129
<Kb.Text type="BodyTiny" virtualText={true}>

‎shared/chat/conversation/messages/wrapper/exploding-height-retainer/index.native.tsx‎

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class ExplodingHeightRetainer extends React.Component<Props, State> {
9292
>
9393
{this.state.children}
9494
<AnimatedAshTower
95+
forceAsh={this.props.forceAsh}
9596
exploded={this.props.retainHeight}
9697
explodedBy={this.props.explodedBy}
9798
messageKey={this.props.messageKey}
@@ -107,6 +108,7 @@ type AshTowerProps = {
107108
explodedBy?: string
108109
messageKey: string
109110
numImages: number
111+
forceAsh: boolean
110112
}
111113

112114
type AshTowerState = {
@@ -216,7 +218,12 @@ class EmojiTower extends React.Component<
216218
return <Kb.Box style={styles.emojiTower}>{children}</Kb.Box>
217219
}
218220
}
219-
const AshTower = (props: {explodedBy?: string; numImages: number; showExploded: boolean}) => {
221+
const AshTower = (props: {
222+
forceAsh: boolean
223+
explodedBy?: string
224+
numImages: number
225+
showExploded: boolean
226+
}) => {
220227
const children: Array<React.ReactNode> = []
221228
for (let i = 0; i < props.numImages; i++) {
222229
children.push(
@@ -228,7 +235,15 @@ const AshTower = (props: {explodedBy?: string; numImages: number; showExploded:
228235
)
229236
}
230237
let exploded: React.ReactNode = null
231-
if (props.showExploded) {
238+
239+
if (props.forceAsh) {
240+
exploded = (
241+
<Kb.Text type="BodyTiny" style={styles.exploded} fixOverdraw={false}>
242+
Unavailable
243+
</Kb.Text>
244+
)
245+
}
246+
if (!exploded && props.showExploded) {
232247
exploded = !props.explodedBy ? (
233248
<Kb.Text type="BodyTiny" style={styles.exploded} fixOverdraw={false}>
234249
EXPLODED

‎shared/chat/inbox/index.desktop.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,10 @@ const Inbox = React.memo(function Inbox(props: TInbox.Props) {
258258
)
259259

260260
if (smallTeamsExpanded !== lastSmallTeamsExpanded.current || rows.length !== lastRowsLength.current) {
261-
listRef.current?.resetAfterIndex(0, true)
261+
// this calls setstate so defer
262+
setTimeout(() => {
263+
listRef.current?.resetAfterIndex(0, true)
264+
}, 0)
262265
}
263266

264267
const calculateShowUnreadShortcut = React.useCallback(() => {

‎shared/chat/inbox/index.native.tsx‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,11 @@ const Inbox = React.memo(function Inbox(p: TInbox.Props) {
306306
) : null
307307

308308
const promptSmallTeamsNum = React.useCallback(() => {
309-
console.log('aaaa show prompt')
310309
if (C.isIOS) {
311310
Alert.prompt(
312311
'Change shown',
313312
'Number of conversations to show above this button',
314313
ns => {
315-
console.log('aaaa show prompt got', ns)
316314
const n = parseInt(ns, 10)
317315
if (n > 0) {
318316
setInboxNumSmallRows(n)

‎shared/images/iconfont/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* [Dependencies](#dependencies)
33
* [Troubleshooting](#troubleshooting)
44

5-
The complete SVG pipeline is as follows
5+
The complete SVG pipeline was as follows. Zeplin etc is gone
66

77
Sketch Assets → Zeplin → Export to SVG → Optimized with SVGO → Download
88

-68.9 KB
Binary file not shown.
-1.13 MB
Binary file not shown.
-69.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)