fix(@desktop/settings): Enable stickers/ens on ropsten

fixes #911
This commit is contained in:
Anthony Laibe 2021-08-09 17:23:44 +02:00
parent 86688a7e59
commit 4958e4d941
5 changed files with 19 additions and 5 deletions

View File

@ -249,6 +249,16 @@ ScrollView {
} }
} }
} }
StatusSettingsLineButton {
text: qsTr("Stickers/ENS on ropsten")
visible: profileModel.network.current === Constants.networkRopsten
isSwitch: true
switchChecked: appSettings.stickersEnsRopsten
onClicked: {
appSettings.stickersEnsRopsten = !appSettings.stickersEnsRopsten
}
}
} }
NetworksModal { NetworksModal {

View File

@ -271,7 +271,7 @@ Item {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: Style.current.padding anchors.bottomMargin: Style.current.padding
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
enabled: profileModel.network.current === Constants.networkMainnet // Comment this to use on testnet enabled: networkGuarded
//% "Start" //% "Start"
text: enabled ? text: enabled ?
qsTrId("start") : qsTrId("start") :

View File

@ -26,8 +26,8 @@ Item {
signal goToWelcome(); signal goToWelcome();
signal goToList(); signal goToList();
function goToStart(){ /* Comment this to use on testnet */ function goToStart(){
if(profileModel.ens.rowCount() > 0 && profileModel.network.current === "mainnet_rpc"){ if(profileModel.ens.rowCount() > 0 && networkGuarded){
goToList(); goToList();
} else { } else {
goToWelcome(); goToWelcome();

View File

@ -26,6 +26,7 @@ StatusAppLayout {
property alias appSettings: appSettings property alias appSettings: appSettings
property bool profilePopupOpened: false property bool profilePopupOpened: false
property bool networkGuarded: profileModel.network.current === Constants.networkMainnet || (profileModel.network.current === Constants.networkRopsten && appSettings.stickersEnsRopsten)
signal settingsLoaded() signal settingsLoaded()
@ -454,6 +455,9 @@ StatusAppLayout {
property bool devToolsEnabled: false property bool devToolsEnabled: false
property bool pdfViewerEnabled: true property bool pdfViewerEnabled: true
property bool compatibilityMode: true property bool compatibilityMode: true
// Ropsten settings
property bool stickersEnsRopsten: false
} }
ErrorSound { ErrorSound {

View File

@ -1103,7 +1103,7 @@ Rectangle {
anchors.leftMargin: 2 anchors.leftMargin: 2
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
icon.name: "stickers_icon" icon.name: "stickers_icon"
visible: !isEdit && profileModel.network.current === Constants.networkMainnet && emojiBtn.visible visible: !isEdit && networkGuarded && emojiBtn.visible
width: visible ? 32 : 0 width: visible ? 32 : 0
type: "secondary" type: "secondary"
onClicked: togglePopup(stickersPopup, stickersBtn) onClicked: togglePopup(stickersPopup, stickersBtn)