Skip to content

Commit

Permalink
VPN-6892 fix reinstate message (#10318)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcleinman authored Mar 5, 2025
1 parent db97e06 commit 5712c13
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/addons/manager/addonmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,14 +419,20 @@ QJSValue AddonManager::reduce(QJSValue callback, QJSValue initialValue) const {

// Undismisses any dismissed messages and marks all messages as unread
void AddonManager::reinstateMessages() const {
logger.debug() << "Reinstating all messages";
SettingsHolder* settingsHolder = SettingsHolder::instance();
Q_ASSERT(settingsHolder);

// Group containing all the message settings.
// It only needs to live for the scope of this function.
SettingGroup* messageSettingGroup =
SettingsManager::instance()->createSettingGroup(
ADDON_MESSAGE_SETTINGS_GROUP);
QString("%1/%2")
.arg(Constants::ADDONS_SETTINGS_GROUP)
.arg(ADDON_MESSAGE_SETTINGS_GROUP),
true, // remove when reset
false // sensitive setting
);
messageSettingGroup->remove();
}

Expand Down
1 change: 1 addition & 0 deletions src/ui/screens/getHelp/developerMenu/ViewDeveloperMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ MZViewBase {
text: "Reinstate messages"
onClicked: {
MZAddonManager.reinstateMessages()
restartRequired.isVisible = true
}
}

Expand Down

0 comments on commit 5712c13

Please sign in to comment.