Skip to content
Snippets Groups Projects
Commit 3f72b611 authored by kaniini's avatar kaniini
Browse files

Merge branch 'prime-number-step-for-who-to-follow-panel' into 'develop'

Prime number step for Who to follow panel

See merge request pleroma/pleroma-fe!340
parents 2eab0cb1 3a172529
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment