mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Add toggle for disabling service bulletin (#1347)
* Add toggle for disabling service bulletin * Make the toggle functional * Fix + add toggle to Advanced Settings * Remove unused variable --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -103,7 +103,16 @@ class _DashboardPageView extends BasePage {
|
||||
Widget get endDrawer => MenuWidget(dashboardViewModel);
|
||||
|
||||
@override
|
||||
Widget leading(BuildContext context) => ServicesUpdatesWidget(dashboardViewModel.getServicesStatus());
|
||||
Widget leading(BuildContext context) {
|
||||
return Observer(
|
||||
builder: (context) {
|
||||
if (dashboardViewModel.isEnabledBulletinAction) {
|
||||
return ServicesUpdatesWidget(dashboardViewModel.getServicesStatus());
|
||||
}
|
||||
return const SizedBox();
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget middle(BuildContext context) {
|
||||
|
||||
@@ -100,6 +100,12 @@ class _AdvancedPrivacySettingsBodyState extends State<AdvancedPrivacySettingsBod
|
||||
Observer(builder: (_) {
|
||||
return Column(
|
||||
children: [
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.disable_bulletin,
|
||||
value: widget.privacySettingsViewModel.disableBulletin,
|
||||
onValueChange: (BuildContext _, bool value) {
|
||||
widget.privacySettingsViewModel.setDisableBulletin(value);
|
||||
}),
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.add_custom_node,
|
||||
value: widget.privacySettingsViewModel.addCustomNode,
|
||||
|
||||
@@ -80,6 +80,12 @@ class PrivacyPage extends BasePage {
|
||||
onValueChange: (BuildContext _, bool value) {
|
||||
_privacySettingsViewModel.setDisableSell(value);
|
||||
}),
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.disable_bulletin,
|
||||
value: _privacySettingsViewModel.disableBulletin,
|
||||
onValueChange: (BuildContext _, bool value) {
|
||||
_privacySettingsViewModel.setDisableBulletin(value);
|
||||
}),
|
||||
if (_privacySettingsViewModel.canUseEtherscan)
|
||||
SettingsSwitcherCell(
|
||||
title: S.current.etherscan_history,
|
||||
|
||||
Reference in New Issue
Block a user