Unverified Commit c2a582fa authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[feat] restrict locations to selected transport

parent 330d1172
......@@ -181,6 +181,7 @@ ApplicationWindow {
ctx = JSON.parse(jsonModel.getJson())
// TODO pass QML_DEBUG variable to be hyper-verbose
//console.debug(jsonModel.getJson())
gwSelector.model = Object.keys(ctx.locations)
if (ctx.donateDialog == 'true') {
......
......@@ -81,6 +81,7 @@ func UseAutomaticGateway() {
func SetTransport(label string) {
ctx.bm.SetTransport(label)
go trigger(OnStatusChanged)
}
func GetTransport() *C.char {
......
......@@ -97,6 +97,9 @@ func (p *gatewayPool) listLocationFullness(transport string) map[string]float64
}
if len(p.recommended) != 0 {
for _, gw := range p.recommended {
if gw.gateway.Transport != transport {
continue
}
if _, ok := cm[gw.gateway.Location]; ok {
continue
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment