diff options
| author | Henry Jameson <me@hjkos.com> | 2018-09-09 15:55:43 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-09-09 15:55:43 +0300 |
| commit | 0656e0ef324ae8361a872908bb1b26a3d4ad4129 (patch) | |
| tree | e4c0cf6f8ac98da1204d500d9cfdc04cd7d36f27 /src/components/who_to_follow_panel | |
| parent | e6adddbba69cbcc71d3f3ba3d0734b7fefbc44d4 (diff) | |
| parent | ed6abeacadc2bced05f3221b2c57ba488f0ae800 (diff) | |
Merge remote-tracking branch 'upstream/develop' into translations-separation
* upstream/develop: (21 commits)
use prime number step for Who to follow panel
fix
Revert "Update messages.js"
Update messages.js Update the Occitan language - Fixed Linting
remove formatting options
Remove outdated settings
features panel i18n
features panes supports chat & gopher
fix collapse link being too small
small fix for non-square gif avatars
Fixed collapseMessageWithSubjectLocal always using instance-provided config.
Fix last place with usercard having wrong width
Fixed non-masked image looking weird in chrome.
Kinda went back to using align-items: stretch. Fixed error message floating.
Simplified image sensitivity label
show features panel only if not login
update
debug
update
debug
...
Diffstat (limited to 'src/components/who_to_follow_panel')
| -rw-r--r-- | src/components/who_to_follow_panel/who_to_follow_panel.js | 12 |
1 files changed, 5 insertions, 7 deletions
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 6766e561..ce60308f 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 @@ -3,9 +3,10 @@ import apiService from '../../services/api/api.service.js' function showWhoToFollow (panel, reply) { var users = reply var cn - var index = 0 - var random = Math.floor(Math.random() * 10) - for (cn = random; cn < users.length; cn = cn + 10) { + var index + var step = 7 + cn = Math.floor(Math.random() * step) + for (index = 0; index < 3; index++) { var user user = users[cn] var img @@ -46,11 +47,8 @@ function showWhoToFollow (panel, reply) { } }) } - index = index + 1 - if (index > 2) { - break - } } + cn = (cn + step) % users.length } function getWhoToFollow (panel) { |
