Change type of "hashtags" from Immutable to Set int "search.ts"

remove-immutable-compose
danidfra 2024-12-17 16:44:15 -03:00
rodzic 4ae241111c
commit 762c3520f0
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -28,7 +28,7 @@ const ResultsRecord = ImmutableRecord({
accounts: ImmutableOrderedSet<string>(),
statuses: ImmutableOrderedSet<string>(),
groups: ImmutableOrderedSet<string>(),
hashtags: ImmutableOrderedSet<Tag>(), // it's a list of maps
hashtags: new Set<Tag>(), // it's a list of maps
accountsHasMore: false,
statusesHasMore: false,
groupsHasMore: false,
@ -65,7 +65,7 @@ const importResults = (state: State, results: APIEntity, searchTerm: string, sea
statuses: toIds(results.statuses),
accounts: toIds(results.accounts),
groups: toIds(results.groups),
hashtags: ImmutableOrderedSet(results.hashtags.map(normalizeTag)), // it's a list of records
hashtags: new Set(results.hashtags.map(normalizeTag)), // it's a list of records
accountsHasMore: results.accounts.length >= 20,
statusesHasMore: results.statuses.length >= 20,
groupsHasMore: results.groups?.length >= 20,