Skip to content
Snippets Groups Projects
Unverified Commit 58b15c89 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[bug] avoid inconsistent states

parent f0889825
Branches master
Tags 0.20.4
No related merge requests found
...@@ -248,15 +248,16 @@ ThemedPage { ...@@ -248,15 +248,16 @@ ThemedPage {
} }
Component.onCompleted: { Component.onCompleted: {
if (ctx && ctx.transport == "obfs4") {
useBridgesCheckBox.checked = true
}
if (ctx && ctx.offersUdp == "false") { if (ctx && ctx.offersUdp == "false") {
useUDP.enabled = false useUDP.enabled = false
} }
if (ctx && ctx.offersUdp && ctx.udp == "true") { if (ctx && ctx.offersUdp && ctx.udp == "true") {
useUDP.checked = true useUDP.checked = true
} }
if (ctx && ctx.transport == "obfs4") {
useBridgesCheckBox.checked = true
useUDP.enabled = false
}
// disabled for now, will be on next release // disabled for now, will be on next release
/* /*
if (ctx && ctx.hasTor == "true") { if (ctx && ctx.hasTor == "true") {
......
...@@ -111,6 +111,9 @@ ApplicationWindow { ...@@ -111,6 +111,9 @@ ApplicationWindow {
if (ctx.donateDialog == 'true') { if (ctx.donateDialog == 'true') {
showDonationReminder = true showDonationReminder = true
} }
if (isAutoLocation()) {
root.selectedGateway = "auto"
}
// TODO check donation // TODO check donation
//if (needsDonate && !shownDonate) { //if (needsDonate && !shownDonate) {
...@@ -149,6 +152,16 @@ ApplicationWindow { ...@@ -149,6 +152,16 @@ ApplicationWindow {
return Array.from(arr, (k,_) => k.key); return Array.from(arr, (k,_) => k.key);
} }
function isAutoLocation() {
// FIXME there's something weird going on with newyork location...
// it gets marked as auto, which from europe is a bug.
let best = ctx.locationLabels[ctx.bestLocation]
if (best == undefined) {
return false
}
return (best[0] == ctx.currentLocation)
}
function bringToFront() { function bringToFront() {
// FIXME does not work properly, at least on linux // FIXME does not work properly, at least on linux
if (visibility == 3) { if (visibility == 3) {
......
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