sforkowany z mirror/soapbox
Merge branch 'fedibird' into 'develop'
Fedibird birthdays Closes #833 See merge request soapbox-pub/soapbox-fe!1054improve-ci
commit
07aaa427a6
|
@ -56,7 +56,7 @@ class Account extends ImmutablePureComponent {
|
|||
|
||||
if (!account) return null;
|
||||
|
||||
const birthday = account.getIn(['pleroma', 'birthday']);
|
||||
const birthday = account.get('birthday');
|
||||
if (!birthday) return null;
|
||||
|
||||
const formattedBirthday = intl.formatDate(birthday, { day: 'numeric', month: 'short', year: 'numeric' });
|
||||
|
|
|
@ -114,7 +114,7 @@ class EditProfile extends ImmutablePureComponent {
|
|||
const strangerNotifications = account.getIn(['pleroma', 'notification_settings', 'block_from_strangers']);
|
||||
const acceptsEmailList = account.getIn(['pleroma', 'accepts_email_list']);
|
||||
const discoverable = account.getIn(['source', 'pleroma', 'discoverable']);
|
||||
const birthday = account.getIn(['pleroma', 'birthday']);
|
||||
const birthday = account.get('birthday');
|
||||
const showBirthday = account.getIn(['source', 'pleroma', 'show_birthday']);
|
||||
|
||||
const initialState = account.withMutations(map => {
|
||||
|
|
|
@ -85,7 +85,7 @@ class ProfileInfoPanel extends ImmutablePureComponent {
|
|||
getBirthday = () => {
|
||||
const { account, intl } = this.props;
|
||||
|
||||
const birthday = account.getIn(['pleroma', 'birthday']);
|
||||
const birthday = account.get('birthday');
|
||||
if (!birthday) return null;
|
||||
|
||||
const formattedBirthday = intl.formatDate(birthday, { timeZone: 'UTC', day: 'numeric', month: 'long', year: 'numeric' });
|
||||
|
|
|
@ -48,12 +48,19 @@ const normalizePleroma = account => {
|
|||
};
|
||||
|
||||
const normalizeAccount = (state, account) => {
|
||||
const normalized = fromJS(normalizePleroma(account)).deleteAll([
|
||||
'followers_count',
|
||||
'following_count',
|
||||
'statuses_count',
|
||||
'source',
|
||||
]);
|
||||
const normalized = fromJS(normalizePleroma(account)).withMutations(account => {
|
||||
account.deleteAll([
|
||||
'followers_count',
|
||||
'following_count',
|
||||
'statuses_count',
|
||||
'source',
|
||||
]);
|
||||
account.set(
|
||||
'birthday',
|
||||
account.getIn(['pleroma', 'birthday'], account.getIn(['other_settings', 'birthday'])),
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
return state.set(account.id, normalized);
|
||||
};
|
||||
|
|
Ładowanie…
Reference in New Issue