バグ #664 » change_account.rb.diff
core/plugin/change_account/change_account.rb | ||
---|---|---|
index = Service.instances.index(Service.primary)
|
||
if index
|
||
max = Service.instances.size
|
||
bound = max - 1
|
||
Service.set_primary(Service.instances[(bound - (bound - index - 1)) % max])
|
||
Service.set_primary(Service.instances[(max + index - 1) % max])
|
||
elsif not Service.instances.empty?
|
||
Service.set_primary(Service.instances.first) end
|
||
end
|