SHA256
Отключить мультиаккаунтность и уточнить статусы профиля
This commit is contained in:
@@ -22,16 +22,8 @@ const CONNECTION_OFFICIAL_UNCONFIRMED = 81;
|
||||
const profileSnapshotCache = new Map();
|
||||
const profileSnapshotPending = new Map();
|
||||
|
||||
// Глагол по полу из профиля автора («Добавила вас в друзья»); пока профиль не пришёл или пол
|
||||
// не указан – нейтральное «Добавил(а)».
|
||||
function byGender(gender, male, female, neutral) {
|
||||
if (gender === 'male') return male;
|
||||
if (gender === 'female') return female;
|
||||
return neutral;
|
||||
}
|
||||
|
||||
function connectionActionLabel(typeCode, gender = '') {
|
||||
const verb = (male, female) => byGender(gender, male, female, t('screens.notifications_view.text_032', { value1: male }));
|
||||
function connectionActionLabel(typeCode) {
|
||||
const verb = (male, female) => t('screens.notifications_view.text_032', { value1: male });
|
||||
switch (Number(typeCode)) {
|
||||
case CONNECTION_CLOSE_FRIEND: return t('screens.notifications_view.text_033', { value1: verb(t('screens.notifications_view.text_047'), t('screens.notifications_view.text_048')) });
|
||||
case CONNECTION_UNCLOSE_FRIEND: return t('screens.notifications_view.text_034', { value1: verb(t('screens.notifications_view.text_049'), t('screens.notifications_view.text_050')) });
|
||||
@@ -45,16 +37,15 @@ function connectionActionLabel(typeCode, gender = '') {
|
||||
}
|
||||
}
|
||||
|
||||
function eventActionLabel(typeCode, gender = '') {
|
||||
if (Number(typeCode) === CONNECTION_UNFOLLOW) return t('screens.notifications_view.text_042', { value1: byGender(gender, t('screens.notifications_view.text_065'), t('screens.notifications_view.text_066'), t('screens.notifications_view.text_067')) });
|
||||
return t('screens.notifications_view.text_043', { value1: byGender(gender, t('screens.notifications_view.text_068'), t('screens.notifications_view.text_069'), t('screens.notifications_view.text_070')) });
|
||||
function eventActionLabel(typeCode) {
|
||||
if (Number(typeCode) === CONNECTION_UNFOLLOW) return t('screens.notifications_view.text_042', { value1: t('screens.notifications_view.text_067') });
|
||||
return t('screens.notifications_view.text_043', { value1: t('screens.notifications_view.text_070') });
|
||||
}
|
||||
|
||||
function actionLabel(item, activeTab) {
|
||||
const gender = String(item.profile?.gender || '');
|
||||
return activeTab === 'connections'
|
||||
? connectionActionLabel(item.connectionTypeCode ?? item.sourceMsgSubType, gender)
|
||||
: eventActionLabel(item.sourceMsgSubType, gender);
|
||||
? connectionActionLabel(item.connectionTypeCode ?? item.sourceMsgSubType)
|
||||
: eventActionLabel(item.sourceMsgSubType);
|
||||
}
|
||||
|
||||
function reciprocalRelationKind(item) {
|
||||
|
||||
Reference in New Issue
Block a user