Record --> ImmutableRecord

This commit is contained in:
Alex Gleason 2022-03-09 16:00:43 -06:00
parent 5ddc8542fd
commit 9537c87909
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
3 changed files with 18 additions and 6 deletions

View file

@ -1,9 +1,13 @@
import { Map as ImmutableMap, List as ImmutableList, Record } from 'immutable';
import {
Map as ImmutableMap,
List as ImmutableList,
Record as ImmutableRecord,
} from 'immutable';
import { IAccount } from 'soapbox/types';
import { mergeDefined } from 'soapbox/utils/normalizers';
const AccountRecord = Record({
const AccountRecord = ImmutableRecord({
acct: '',
avatar: '',
avatar_static: '',

View file

@ -1,11 +1,15 @@
import { Map as ImmutableMap, List as ImmutableList, Record } from 'immutable';
import {
Map as ImmutableMap,
List as ImmutableList,
Record as ImmutableRecord,
} from 'immutable';
import { parseVersion, PLEROMA } from 'soapbox/utils/features';
import { mergeDefined } from 'soapbox/utils/normalizers';
import { isNumber } from 'soapbox/utils/numbers';
// Use Mastodon defaults
const InstanceRecord = Record({
const InstanceRecord = ImmutableRecord({
approval_required: false,
contact_account: ImmutableMap(),
configuration: ImmutableMap({

View file

@ -1,10 +1,14 @@
import { Map as ImmutableMap, List as ImmutableList, Record } from 'immutable';
import {
Map as ImmutableMap,
List as ImmutableList,
Record as ImmutableRecord,
} from 'immutable';
import { IStatus } from 'soapbox/types';
import { accountToMention } from 'soapbox/utils/accounts';
import { mergeDefined } from 'soapbox/utils/normalizers';
const StatusRecord = Record({
const StatusRecord = ImmutableRecord({
account: ImmutableMap(),
application: null,
bookmarked: false,