File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,12 @@ export function getBubbleProps(attributes: any) {
11
11
12
12
return model . getPropsForBubble ( ) ;
13
13
}
14
+
15
+ export function isVoiceFlag ( flags : any ) : boolean {
16
+ // @ts -ignore
17
+ const protoFlags = window . textsecure . protobuf . AttachmentPointer . Flags ;
18
+ const VOICE_MESSAGE_FLAG = protoFlags . VOICE_MESSAGE ;
19
+
20
+ // tslint:disable-next-line no-bitwise
21
+ return Boolean ( flags && flags & VOICE_MESSAGE_FLAG ) ;
22
+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
10
10
without ,
11
11
} from 'lodash' ;
12
12
import { trigger } from '../../shims/events' ;
13
+ import { isVoiceFlag } from '../../shims/Whisper' ;
13
14
import { NoopActionType } from './noop' ;
14
15
import {
15
16
AttachmentType ,
@@ -541,7 +542,8 @@ function hasMessageHeightChanged(
541
542
previousAttachments [ 0 ] . pending &&
542
543
messageAttachments [ 0 ] &&
543
544
( isImageAttachment ( messageAttachments [ 0 ] ) ||
544
- isVideoAttachment ( messageAttachments [ 0 ] ) ) &&
545
+ isVideoAttachment ( messageAttachments [ 0 ] ) ||
546
+ isVoiceFlag ( messageAttachments [ 0 ] . flags ) ) &&
545
547
! messageAttachments [ 0 ] . pending ;
546
548
if ( singleVisualAttachmentNoLongerPending ) {
547
549
return true ;
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export interface AttachmentType {
38
38
url : string ;
39
39
contentType : MIME . MIMEType ;
40
40
} ;
41
+ flags ?: number ;
41
42
thumbnail ?: {
42
43
height : number ;
43
44
width : number ;
You can’t perform that action at this time.
0 commit comments