mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-27 00:35:27 -04:00
Settings option to shush success KeeShare notifications (#3236)
This commit is contained in:
parent
16a11c3a7f
commit
54eafc8ebe
3 changed files with 23 additions and 6 deletions
|
@ -261,18 +261,22 @@ void ShareObserver::reinitialize()
|
|||
|
||||
void ShareObserver::notifyAbout(const QStringList& success, const QStringList& warning, const QStringList& error)
|
||||
{
|
||||
if (error.isEmpty() && warning.isEmpty() && success.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList messages;
|
||||
MessageWidget::MessageType type = MessageWidget::Positive;
|
||||
if (!(success.isEmpty() || config()->get("GUI/QuietKeeShareSuccess").toBool())) {
|
||||
messages += success;
|
||||
}
|
||||
if (!warning.isEmpty()) {
|
||||
type = MessageWidget::Warning;
|
||||
messages += warning;
|
||||
}
|
||||
if (!error.isEmpty()) {
|
||||
type = MessageWidget::Error;
|
||||
messages += error;
|
||||
}
|
||||
if (!messages.isEmpty()) {
|
||||
emit sharingMessage(messages.join("\n"), type);
|
||||
}
|
||||
emit sharingMessage((success + warning + error).join("\n"), type);
|
||||
}
|
||||
|
||||
void ShareObserver::handleDatabaseChanged()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue