diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2024-05-31 13:19:49 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-31 13:19:49 +0900 |
| commit | dfeaa1145b61dde4edeff452f5308e11a1ef19a2 (patch) | |
| tree | 1dbdce2e26afd2cfd0cf1e97ac5a843446647626 /packages/frontend/src/scripts/collapsed.ts | |
| parent | Bump version to 2024.5.0-rc.7 (diff) | |
| parent | New Crowdin updates (#13892) (diff) | |
| download | sharkey-dfeaa1145b61dde4edeff452f5308e11a1ef19a2.tar.gz sharkey-dfeaa1145b61dde4edeff452f5308e11a1ef19a2.tar.bz2 sharkey-dfeaa1145b61dde4edeff452f5308e11a1ef19a2.zip | |
Merge branch 'develop' into release/2024.5.0
Diffstat (limited to 'packages/frontend/src/scripts/collapsed.ts')
| -rw-r--r-- | packages/frontend/src/scripts/collapsed.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/packages/frontend/src/scripts/collapsed.ts b/packages/frontend/src/scripts/collapsed.ts index 237bd37c7a..4ec88a3c65 100644 --- a/packages/frontend/src/scripts/collapsed.ts +++ b/packages/frontend/src/scripts/collapsed.ts @@ -6,15 +6,16 @@ import * as Misskey from 'misskey-js'; export function shouldCollapsed(note: Misskey.entities.Note, urls: string[]): boolean { - const collapsed = note.cw == null && note.text != null && ( - (note.text.includes('$[x2')) || - (note.text.includes('$[x3')) || - (note.text.includes('$[x4')) || - (note.text.includes('$[scale')) || - (note.text.split('\n').length > 9) || - (note.text.length > 500) || - (note.files.length >= 5) || - (urls.length >= 4) + const collapsed = note.cw == null && ( + note.text != null && ( + (note.text.includes('$[x2')) || + (note.text.includes('$[x3')) || + (note.text.includes('$[x4')) || + (note.text.includes('$[scale')) || + (note.text.split('\n').length > 9) || + (note.text.length > 500) || + (urls.length >= 4) + ) || note.files.length >= 5 ); return collapsed; |