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/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.personal-information.photos-library</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
|
|
|
@ -7,11 +7,23 @@
|
|||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<key>com.apple.security.cs.allow-jit</key>
|
||||
<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/>
|
||||
<key>com.apple.security.files.user-selected.read-write</key>
|
||||
<true/>
|
||||
<key>com.apple.security.personal-information.photos-library</key>
|
||||
<true/>
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
"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}\"",
|
||||
"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",
|
||||
"ready": "npm-run-all --print-label clean-transpile grunt --parallel lint lint-deps test-node test-electron",
|
||||
"dev": "run-p --print-label dev:*",
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
import React from 'react';
|
||||
|
||||
import { Avatar } from '../../Avatar';
|
||||
import { Emojify } from '../Emojify';
|
||||
import { LocalizerType } from '../../../types/Util';
|
||||
import { ConversationType } from '../../../state/ducks/conversations';
|
||||
import { bemGenerator } from './util';
|
||||
|
@ -35,7 +36,9 @@ export const ConversationDetailsHeader: React.ComponentType<Props> = ({
|
|||
sharedGroupNames={[]}
|
||||
/>
|
||||
<div>
|
||||
<div className={bem('title')}>{conversation.title}</div>
|
||||
<div className={bem('title')}>
|
||||
<Emojify text={conversation.title} />
|
||||
</div>
|
||||
<div className={bem('subtitle')}>
|
||||
{i18n('ConversationDetailsHeader--members', [
|
||||
memberships.length.toString(),
|
||||
|
|
|
@ -5,6 +5,7 @@ import React from 'react';
|
|||
|
||||
import { LocalizerType } from '../../../types/Util';
|
||||
import { Avatar } from '../../Avatar';
|
||||
import { Emojify } from '../Emojify';
|
||||
|
||||
import { ConversationDetailsIcon } from './ConversationDetailsIcon';
|
||||
import { ConversationType } from '../../../state/ducks/conversations';
|
||||
|
@ -108,7 +109,7 @@ export const ConversationDetailsMembershipList: React.ComponentType<Props> = ({
|
|||
{...member}
|
||||
/>
|
||||
}
|
||||
label={member.isMe ? i18n('you') : member.title}
|
||||
label={<Emojify text={member.isMe ? i18n('you') : member.title} />}
|
||||
right={isAdmin ? i18n('GroupV2--admin') : ''}
|
||||
/>
|
||||
))}
|
||||
|
|
|
@ -3452,7 +3452,7 @@ async function getCurrentGroupState({
|
|||
logId
|
||||
);
|
||||
|
||||
const oldVersion = group.version;
|
||||
const oldVersion = group.revision;
|
||||
const newVersion = decryptedGroupState.version;
|
||||
window.log.info(
|
||||
`getCurrentGroupState/${logId}: Applying full group state, from version ${oldVersion} to ${newVersion}.`
|
||||
|
|
|
@ -2543,7 +2543,7 @@ export class ConversationModel extends window.Backbone
|
|||
sent_at: now,
|
||||
received_at: window.Signal.Util.incrementMessageCounter(),
|
||||
received_at_ms: now,
|
||||
unread: 1,
|
||||
unread: 0,
|
||||
changedId: conversationId || this.id,
|
||||
profileChange,
|
||||
// TODO: DESKTOP-722
|
||||
|
|
|
@ -21,7 +21,10 @@ import {
|
|||
MessageStatusType,
|
||||
PropsData,
|
||||
} 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 * as expirationTimer from '../util/expirationTimer';
|
||||
import { missingCaseError } from '../util/missingCaseError';
|
||||
|
@ -464,33 +467,51 @@ export class MessageModel extends window.Backbone.Model<MessageAttributesType> {
|
|||
|
||||
return window.ConversationController.getConversationId(identifier);
|
||||
});
|
||||
const finalContacts = (conversationIds || []).map(id => {
|
||||
const errorsForContact = errorsGroupedById[id];
|
||||
const isOutgoingKeyError = Boolean(
|
||||
_.find(errorsForContact, error => error.name === OUTGOING_KEY_ERROR)
|
||||
);
|
||||
const isUnidentifiedDelivery =
|
||||
window.storage.get('unidentifiedDeliveryIndicators') &&
|
||||
this.isUnidentifiedDelivery(id, unidentifiedLookup);
|
||||
const finalContacts: Array<SmartMessageDetailContact> = (
|
||||
conversationIds || []
|
||||
).map(
|
||||
(id: string): SmartMessageDetailContact => {
|
||||
const errorsForContact = errorsGroupedById[id];
|
||||
const isOutgoingKeyError = Boolean(
|
||||
_.find(errorsForContact, error => error.name === OUTGOING_KEY_ERROR)
|
||||
);
|
||||
const isUnidentifiedDelivery =
|
||||
window.storage.get('unidentifiedDeliveryIndicators') &&
|
||||
this.isUnidentifiedDelivery(id, unidentifiedLookup);
|
||||
|
||||
return {
|
||||
...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),
|
||||
};
|
||||
});
|
||||
return {
|
||||
...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),
|
||||
};
|
||||
}
|
||||
);
|
||||
// The prefix created here ensures that contacts with errors are listed
|
||||
// first; otherwise it's alphabetical
|
||||
const sortedContacts = _.sortBy(
|
||||
finalContacts,
|
||||
contact => `${contact.errors ? '0' : '1'}${contact.title}`
|
||||
const collator = new Intl.Collator();
|
||||
const sortedContacts: Array<SmartMessageDetailContact> = finalContacts.sort(
|
||||
(
|
||||
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 {
|
||||
|
|
|
@ -18,6 +18,8 @@ import { renderEmojiPicker } from './renderEmojiPicker';
|
|||
|
||||
type MessageDetailProps = ComponentProps<typeof MessageDetail>;
|
||||
|
||||
export { Contact } from '../../components/conversation/MessageDetail';
|
||||
|
||||
export type OwnProps = {
|
||||
contacts: Array<Contact>;
|
||||
errors: Array<Error>;
|
||||
|
|
Loading…
Add table
Reference in a new issue