summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-10-19 09:20:11 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-10-19 09:20:11 +0900
commit8533663b26b8310065daba99b9c01614de19bd3f (patch)
tree86cd38302b2f739c6c339c744cbc347d22f99d53 /src/client
parentRefactoring (diff)
downloadmisskey-8533663b26b8310065daba99b9c01614de19bd3f.tar.gz
misskey-8533663b26b8310065daba99b9c01614de19bd3f.tar.bz2
misskey-8533663b26b8310065daba99b9c01614de19bd3f.zip
:v:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.user-column.vue12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/app/desktop/views/pages/deck/deck.user-column.vue b/src/client/app/desktop/views/pages/deck/deck.user-column.vue
index 7621ac5edb..6804dd97f1 100644
--- a/src/client/app/desktop/views/pages/deck/deck.user-column.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.user-column.vue
@@ -41,6 +41,7 @@ import parseAcct from '../../../../../../misc/acct/parse';
import XColumn from './deck.column.vue';
import XNotes from './deck.notes.vue';
import XNote from '../../components/note.vue';
+import { concat } from '../../../../../../prelude/array';
const fetchLimit = 10;
@@ -93,17 +94,24 @@ export default Vue.extend({
(this.$refs.timeline as any).init(() => this.initTl());
});
+ const image = [
+ 'image/jpeg',
+ 'image/png',
+ 'image/gif'
+ ];
+
(this as any).api('users/notes', {
userId: this.user.id,
- withFiles: true,
+ fileType: image,
limit: 9
}).then(notes => {
notes.forEach(note => {
note.files.forEach(file => {
file._note = note;
- if (this.images.length < 9) this.images.push(file);
});
});
+ const files = concat(notes.map((n: any): any[] => n.files));
+ this.images = files.filter(f => image.includes(f.type)).slice(0, 6);
});
});
},