mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-06-20 02:00:55 +07:00
ISSUE: In start page, icon is highlighted not correctly when press ESC key
ROOT CAUSE: The button state is decided by the attribute isServerInfoShow and it was added by commit68fe20ddf6. The logic to decide whether server info showed is not correct ACTION: Revert commit68fe20ddf6
This commit is contained in:
@@ -43,9 +43,6 @@ PageType {
|
||||
}
|
||||
|
||||
function onClosePage() {
|
||||
tabBar.isServerInfoShow = tabBarStackView.currentItem.objectName !== PageController.getPagePath(PageEnum.PageSettingsServerInfo)
|
||||
&& tabBarStackView.currentItem.objectName !== PageController.getPagePath(PageEnum.PageSettingsSplitTunneling)
|
||||
|
||||
if (tabBarStackView.depth <= 1) {
|
||||
return
|
||||
}
|
||||
@@ -60,8 +57,6 @@ PageType {
|
||||
} else {
|
||||
tabBarStackView.push(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
||||
}
|
||||
|
||||
tabBar.isServerInfoShow = (page === PageEnum.PageSettingsServerInfo) || (page === PageEnum.PageSettingsSplitTunneling) || tabBar.isServerInfoShow
|
||||
}
|
||||
|
||||
function onGoToStartPage() {
|
||||
@@ -147,7 +142,6 @@ PageType {
|
||||
var pagePath = PageController.getPagePath(page)
|
||||
tabBarStackView.clear(StackView.Immediate)
|
||||
tabBarStackView.replace(pagePath, { "objectName" : pagePath }, StackView.Immediate)
|
||||
tabBar.isServerInfoShow = false
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
@@ -161,7 +155,6 @@ PageType {
|
||||
id: tabBar
|
||||
|
||||
property int previousIndex: 0
|
||||
property bool isServerInfoShow: false
|
||||
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
@@ -192,7 +185,7 @@ PageType {
|
||||
}
|
||||
|
||||
TabImageButtonType {
|
||||
isSelected: tabBar.isServerInfoShow ? false : tabBar.currentIndex === 0
|
||||
isSelected: tabBar.currentIndex === 0
|
||||
image: "qrc:/images/controls/home.svg"
|
||||
onClicked: {
|
||||
tabBarStackView.goToTabBarPage(PageEnum.PageHome)
|
||||
@@ -226,7 +219,7 @@ PageType {
|
||||
}
|
||||
|
||||
TabImageButtonType {
|
||||
isSelected: tabBar.isServerInfoShow ? true : tabBar.currentIndex === 2
|
||||
isSelected: tabBar.currentIndex === 2
|
||||
image: "qrc:/images/controls/settings-2.svg"
|
||||
onClicked: {
|
||||
tabBarStackView.goToTabBarPage(PageEnum.PageSettings)
|
||||
|
||||
Reference in New Issue
Block a user