A few small bug fixes
This commit is contained in:
parent
887b2c1db1
commit
efaaafa370
9 changed files with 72 additions and 31 deletions
|
@ -19,6 +19,8 @@
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.files.user-selected.read-write</key>
|
<key>com.apple.security.files.user-selected.read-write</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.personal-information.photos-library</key>
|
||||||
|
<true/>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.network.client</key>
|
||||||
<true/>
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
|
|
|
@ -7,11 +7,23 @@
|
||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.app-sandbox</key>
|
<key>com.apple.security.app-sandbox</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.files.user-selected.read-only</key>
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.device.audio-input</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.device.microphone</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.device.camera</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.files.downloads.read-write</key>
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.files.user-selected.read-write</key>
|
<key>com.apple.security.files.user-selected.read-write</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.personal-information.photos-library</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.network.client</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"lint-license-comments": "ts-node ts/util/lint/license_comments.ts",
|
"lint-license-comments": "ts-node ts/util/lint/license_comments.ts",
|
||||||
"format": "prettier --write \"*.{css,js,json,md,scss,ts,tsx}\" \"./**/*.{css,js,json,md,scss,ts,tsx}\"",
|
"format": "prettier --write \"*.{css,js,json,md,scss,ts,tsx}\" \"./**/*.{css,js,json,md,scss,ts,tsx}\"",
|
||||||
"transpile": "tsc",
|
"transpile": "tsc",
|
||||||
"clean-transpile": "rimraf ts/**/*.js && rimraf ts/*.js tsconfig.tsbuildinfo",
|
"clean-transpile": "rimraf ts/**/*.js && rimraf ts/**/*.js && rimraf ts/*.js && rimraf ts/*.js && rimraf tsconfig.tsbuildinfo && rimraf tsconfig.tsbuildinfo",
|
||||||
"open-coverage": "open coverage/lcov-report/index.html",
|
"open-coverage": "open coverage/lcov-report/index.html",
|
||||||
"ready": "npm-run-all --print-label clean-transpile grunt --parallel lint lint-deps test-node test-electron",
|
"ready": "npm-run-all --print-label clean-transpile grunt --parallel lint lint-deps test-node test-electron",
|
||||||
"dev": "run-p --print-label dev:*",
|
"dev": "run-p --print-label dev:*",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { Avatar } from '../../Avatar';
|
import { Avatar } from '../../Avatar';
|
||||||
|
import { Emojify } from '../Emojify';
|
||||||
import { LocalizerType } from '../../../types/Util';
|
import { LocalizerType } from '../../../types/Util';
|
||||||
import { ConversationType } from '../../../state/ducks/conversations';
|
import { ConversationType } from '../../../state/ducks/conversations';
|
||||||
import { bemGenerator } from './util';
|
import { bemGenerator } from './util';
|
||||||
|
@ -35,7 +36,9 @@ export const ConversationDetailsHeader: React.ComponentType<Props> = ({
|
||||||
sharedGroupNames={[]}
|
sharedGroupNames={[]}
|
||||||
/>
|
/>
|
||||||
<div>
|
<div>
|
||||||
<div className={bem('title')}>{conversation.title}</div>
|
<div className={bem('title')}>
|
||||||
|
<Emojify text={conversation.title} />
|
||||||
|
</div>
|
||||||
<div className={bem('subtitle')}>
|
<div className={bem('subtitle')}>
|
||||||
{i18n('ConversationDetailsHeader--members', [
|
{i18n('ConversationDetailsHeader--members', [
|
||||||
memberships.length.toString(),
|
memberships.length.toString(),
|
||||||
|
|
|
@ -5,6 +5,7 @@ import React from 'react';
|
||||||
|
|
||||||
import { LocalizerType } from '../../../types/Util';
|
import { LocalizerType } from '../../../types/Util';
|
||||||
import { Avatar } from '../../Avatar';
|
import { Avatar } from '../../Avatar';
|
||||||
|
import { Emojify } from '../Emojify';
|
||||||
|
|
||||||
import { ConversationDetailsIcon } from './ConversationDetailsIcon';
|
import { ConversationDetailsIcon } from './ConversationDetailsIcon';
|
||||||
import { ConversationType } from '../../../state/ducks/conversations';
|
import { ConversationType } from '../../../state/ducks/conversations';
|
||||||
|
@ -108,7 +109,7 @@ export const ConversationDetailsMembershipList: React.ComponentType<Props> = ({
|
||||||
{...member}
|
{...member}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
label={member.isMe ? i18n('you') : member.title}
|
label={<Emojify text={member.isMe ? i18n('you') : member.title} />}
|
||||||
right={isAdmin ? i18n('GroupV2--admin') : ''}
|
right={isAdmin ? i18n('GroupV2--admin') : ''}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -3452,7 +3452,7 @@ async function getCurrentGroupState({
|
||||||
logId
|
logId
|
||||||
);
|
);
|
||||||
|
|
||||||
const oldVersion = group.version;
|
const oldVersion = group.revision;
|
||||||
const newVersion = decryptedGroupState.version;
|
const newVersion = decryptedGroupState.version;
|
||||||
window.log.info(
|
window.log.info(
|
||||||
`getCurrentGroupState/${logId}: Applying full group state, from version ${oldVersion} to ${newVersion}.`
|
`getCurrentGroupState/${logId}: Applying full group state, from version ${oldVersion} to ${newVersion}.`
|
||||||
|
|
|
@ -2543,7 +2543,7 @@ export class ConversationModel extends window.Backbone
|
||||||
sent_at: now,
|
sent_at: now,
|
||||||
received_at: window.Signal.Util.incrementMessageCounter(),
|
received_at: window.Signal.Util.incrementMessageCounter(),
|
||||||
received_at_ms: now,
|
received_at_ms: now,
|
||||||
unread: 1,
|
unread: 0,
|
||||||
changedId: conversationId || this.id,
|
changedId: conversationId || this.id,
|
||||||
profileChange,
|
profileChange,
|
||||||
// TODO: DESKTOP-722
|
// TODO: DESKTOP-722
|
||||||
|
|
|
@ -21,7 +21,10 @@ import {
|
||||||
MessageStatusType,
|
MessageStatusType,
|
||||||
PropsData,
|
PropsData,
|
||||||
} from '../components/conversation/Message';
|
} from '../components/conversation/Message';
|
||||||
import { OwnProps as SmartMessageDetailPropsType } from '../state/smart/MessageDetail';
|
import {
|
||||||
|
OwnProps as SmartMessageDetailPropsType,
|
||||||
|
Contact as SmartMessageDetailContact,
|
||||||
|
} from '../state/smart/MessageDetail';
|
||||||
import { CallbackResultType } from '../textsecure/SendMessage';
|
import { CallbackResultType } from '../textsecure/SendMessage';
|
||||||
import * as expirationTimer from '../util/expirationTimer';
|
import * as expirationTimer from '../util/expirationTimer';
|
||||||
import { missingCaseError } from '../util/missingCaseError';
|
import { missingCaseError } from '../util/missingCaseError';
|
||||||
|
@ -464,33 +467,51 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
||||||
|
|
||||||
return window.ConversationController.getConversationId(identifier);
|
return window.ConversationController.getConversationId(identifier);
|
||||||
});
|
});
|
||||||
const finalContacts = (conversationIds || []).map(id => {
|
const finalContacts: Array<SmartMessageDetailContact> = (
|
||||||
const errorsForContact = errorsGroupedById[id];
|
conversationIds || []
|
||||||
const isOutgoingKeyError = Boolean(
|
).map(
|
||||||
_.find(errorsForContact, error => error.name === OUTGOING_KEY_ERROR)
|
(id: string): SmartMessageDetailContact => {
|
||||||
);
|
const errorsForContact = errorsGroupedById[id];
|
||||||
const isUnidentifiedDelivery =
|
const isOutgoingKeyError = Boolean(
|
||||||
window.storage.get('unidentifiedDeliveryIndicators') &&
|
_.find(errorsForContact, error => error.name === OUTGOING_KEY_ERROR)
|
||||||
this.isUnidentifiedDelivery(id, unidentifiedLookup);
|
);
|
||||||
|
const isUnidentifiedDelivery =
|
||||||
|
window.storage.get('unidentifiedDeliveryIndicators') &&
|
||||||
|
this.isUnidentifiedDelivery(id, unidentifiedLookup);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...this.findAndFormatContact(id),
|
...this.findAndFormatContact(id),
|
||||||
|
|
||||||
status: this.getStatus(id),
|
|
||||||
errors: errorsForContact,
|
|
||||||
isOutgoingKeyError,
|
|
||||||
isUnidentifiedDelivery,
|
|
||||||
onSendAnyway: () =>
|
|
||||||
this.trigger('force-send', { contactId: id, messageId: this.id }),
|
|
||||||
onShowSafetyNumber: () => this.trigger('show-identity', id),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
|
status: this.getStatus(id),
|
||||||
|
errors: errorsForContact,
|
||||||
|
isOutgoingKeyError,
|
||||||
|
isUnidentifiedDelivery,
|
||||||
|
onSendAnyway: () =>
|
||||||
|
this.trigger('force-send', { contactId: id, messageId: this.id }),
|
||||||
|
onShowSafetyNumber: () => this.trigger('show-identity', id),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
// The prefix created here ensures that contacts with errors are listed
|
// The prefix created here ensures that contacts with errors are listed
|
||||||
// first; otherwise it's alphabetical
|
// first; otherwise it's alphabetical
|
||||||
const sortedContacts = _.sortBy(
|
const collator = new Intl.Collator();
|
||||||
finalContacts,
|
const sortedContacts: Array<SmartMessageDetailContact> = finalContacts.sort(
|
||||||
contact => `${contact.errors ? '0' : '1'}${contact.title}`
|
(
|
||||||
|
left: SmartMessageDetailContact,
|
||||||
|
right: SmartMessageDetailContact
|
||||||
|
): number => {
|
||||||
|
const leftErrors = Boolean(left.errors && left.errors.length);
|
||||||
|
const rightErrors = Boolean(right.errors && right.errors.length);
|
||||||
|
|
||||||
|
if (leftErrors && !rightErrors) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (!leftErrors && rightErrors) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return collator.compare(left.title, right.title);
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -18,6 +18,8 @@ import { renderEmojiPicker } from './renderEmojiPicker';
|
||||||
|
|
||||||
type MessageDetailProps = ComponentProps<typeof MessageDetail>;
|
type MessageDetailProps = ComponentProps<typeof MessageDetail>;
|
||||||
|
|
||||||
|
export { Contact } from '../../components/conversation/MessageDetail';
|
||||||
|
|
||||||
export type OwnProps = {
|
export type OwnProps = {
|
||||||
contacts: Array<Contact>;
|
contacts: Array<Contact>;
|
||||||
errors: Array<Error>;
|
errors: Array<Error>;
|
||||||
|
|
Loading…
Add table
Reference in a new issue