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 {

View File

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

View File

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

View File

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

View File

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