adress reviews

This commit is contained in:
Audric Ackermann 2020-07-30 15:53:44 +10:00
parent 761ebf4a7c
commit 9464c03806
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4
2 changed files with 11 additions and 6 deletions

View File

@ -1327,11 +1327,11 @@
"description": "Description of why multi device is disabled on app start"
},
"multiDeviceDisabledTemporaryDescriptionPrimary": {
"message": "Youre seeing this because you have a secondary device linked to your Session ID. To improve reliability and stability, weve decided to temporarily disable Sessions multi-device functionality on <span style=\"color:#00f782\">August 6th</span>. Device linking has been disabled, and the next update will erase existing secondary devices. </br></br>To read more about this change, visit the Session FAQ at <a href=\"https://getsession.org/faq\">getsession.org/faq</a>",
"message": "Youre seeing this because you have a secondary device linked to your Session ID. To improve reliability and stability, weve decided to temporarily disable Sessions multi-device functionality. Device linking has been disabled, and existing secondary clients will be erased on <span style=\"color:#00f782\">August 6th</span>.</br></br>To read more about this change, visit the Session FAQ at <a href=\"https://getsession.org/faq\">getsession.org/faq</a>.",
"description": "Description of why multi device is disabled on app start for a primary device"
},
"multiDeviceDisabledTemporaryDescriptionSecondary": {
"message": "Youre seeing this because this is a secondary device in a multi-device setup. To improve reliability and stability, weve decided to temporarily disable Sessions multi-device functionality on <span style=\"color:#00f782\">August 6th</span>. Device linking has been disabled, and the next update will erase existing secondary devices.</br>To read more about this change, visit the Session FAQ at <a href=\"https://getsession.org/faq\">getsession.org/faq</a>",
"message": "Youre seeing this because this is a secondary device in a multi-device setup. To improve reliability and stability, weve decided to temporarily disable Sessions multi-device functionality. Device linking has been disabled, and existing secondary clients will be erased on <span style=\"color:#00f782\">August 6th</span>.</br></br>To read more about this change, visit the Session FAQ at <a href=\"https://getsession.org/faq\">getsession.org/faq</a>.",
"description": "Description of why multi device is disabled on app start for a secondary device"
},
"messageTTL": {

View File

@ -3,6 +3,7 @@ import { SessionIconButton, SessionIconSize, SessionIconType } from './icon';
import { Avatar } from '../Avatar';
import { PropsData as ConversationListItemPropsType } from '../ConversationListItem';
import { MultiDeviceProtocol } from '../../session/protocols';
import { UserUtil } from '../../util';
export enum SectionType {
Profile,
@ -58,14 +59,18 @@ export class ActionsPanel extends React.Component<Props, State> {
'refreshAvatarCallback'
);
setTimeout(async () => {
const currentDevice = await UserUtil.getCurrentDevicePubKey();
if (!currentDevice) {
return;
}
const secondaryDevices = await MultiDeviceProtocol.getSecondaryDevices(currentDevice);
const isSecondary = secondaryDevices.find(s => s.key === currentDevice) || !!window.textsecure.storage.get('isSecondaryDevice');
const hasMultipleDevices =
(await MultiDeviceProtocol.getOurDevices()).length > 1;
const primaryWithSecondary =
!window.textsecure.storage.get('isSecondaryDevice') &&
!isSecondary &&
hasMultipleDevices;
const isSecondary = !!window.textsecure.storage.get(
'isSecondaryDevice'
);
if (!primaryWithSecondary && !isSecondary) {
return;