This commit is contained in:
syuilo
2018-09-05 19:32:46 +09:00
parent db943df0c8
commit a1b82e9723
43 changed files with 167 additions and 196 deletions

View File

@ -16,9 +16,9 @@ const summarize = (note: any): string => {
// 本文
summary += note.text ? note.text : '';
// メディアが添付されているとき
if (note.media.length != 0) {
summary += ` (${note.media.length}つのメディア)`;
// ファイルが添付されているとき
if (note.files.length != 0) {
summary += ` (${note.files.length}つのファイル)`;
}
// 投票が添付されているとき

View File

@ -1,5 +1,5 @@
import { INote } from '../models/note';
export default function(note: INote): boolean {
return note.renoteId != null && (note.text != null || note.poll != null || (note.mediaIds != null && note.mediaIds.length > 0));
return note.renoteId != null && (note.text != null || note.poll != null || (note.fileIds != null && note.fileIds.length > 0));
}