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 osx-fonts
No related tags found
No related merge requests found
......@@ -248,15 +248,16 @@ ThemedPage {
}
Component.onCompleted: {
if (ctx && ctx.transport == "obfs4") {
useBridgesCheckBox.checked = true
}
if (ctx && ctx.offersUdp == "false") {
useUDP.enabled = false
}
if (ctx && ctx.offersUdp && ctx.udp == "true") {
useUDP.checked = true
}
if (ctx && ctx.transport == "obfs4") {
useBridgesCheckBox.checked = true
useUDP.enabled = false
}
// disabled for now, will be on next release
/*
if (ctx && ctx.hasTor == "true") {
......
......@@ -111,6 +111,9 @@ ApplicationWindow {
if (ctx.donateDialog == 'true') {
showDonationReminder = true
}
if (isAutoLocation()) {
root.selectedGateway = "auto"
}
// TODO check donation
//if (needsDonate && !shownDonate) {
......@@ -149,6 +152,16 @@ ApplicationWindow {
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() {
// FIXME does not work properly, at least on linux
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