Merge remote-tracking branch 'parent/main' into upstream-20241126
This commit is contained in:
commit
8a075ba4c6
303 changed files with 7495 additions and 4498 deletions
19
app/javascript/mastodon/models/list.ts
Normal file
19
app/javascript/mastodon/models/list.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
import type { RecordOf } from 'immutable';
|
||||
import { Record } from 'immutable';
|
||||
|
||||
import type { ApiListJSON } from 'mastodon/api_types/lists';
|
||||
|
||||
type ListShape = Required<ApiListJSON>; // no changes from server shape
|
||||
export type List = RecordOf<ListShape>;
|
||||
|
||||
const ListFactory = Record<ListShape>({
|
||||
id: '',
|
||||
title: '',
|
||||
exclusive: false,
|
||||
replies_policy: 'list',
|
||||
notify: false,
|
||||
});
|
||||
|
||||
export function createList(attributes: Partial<ListShape>) {
|
||||
return ListFactory(attributes);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue