From 207c188c16bc04bd004233666c79db4e9b3fbfc9 Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Sun, 9 Sep 2018 15:22:55 +0000 Subject: Debug --- src/components/who_to_follow_panel/who_to_follow_panel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components') diff --git a/src/components/who_to_follow_panel/who_to_follow_panel.js b/src/components/who_to_follow_panel/who_to_follow_panel.js index ce60308f..bc62f455 100644 --- a/src/components/who_to_follow_panel/who_to_follow_panel.js +++ b/src/components/who_to_follow_panel/who_to_follow_panel.js @@ -47,8 +47,8 @@ function showWhoToFollow (panel, reply) { } }) } + cn = (cn + step) % users.length } - cn = (cn + step) % users.length } function getWhoToFollow (panel) { -- cgit v1.2.3-70-g09d2 From 89f9b3a4686b50c5a99cbb1acba57f70b651786d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 12 Sep 2018 11:46:02 +0300 Subject: fixed autocomplete --- src/components/post_status_form/post_status_form.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/components') diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index d7f1ffb2..7babe236 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -75,8 +75,11 @@ const PostStatusForm = { candidates () { const firstchar = this.textAtCaret.charAt(0) if (firstchar === '@') { - const matchedUsers = filter(this.users, (user) => (String(user.name + user.screen_name)).toUpperCase() - .startsWith(this.textAtCaret.slice(1).toUpperCase())) + const query = this.textAtCaret.slice(1).toUpperCase() + const matchedUsers = filter(this.users, (user) => { + return user.screen_name.toUpperCase().startsWith(query) || + user.name && user.name.toUpperCase().startsWith(query) + }) if (matchedUsers.length <= 0) { return false } -- cgit v1.2.3-70-g09d2