mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-04 15:39:34 +01:00
Settings option to shush success KeeShare notifications (#3236)
This commit is contained in:
committed by
Jonathan White
parent
16a11c3a7f
commit
54eafc8ebe
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user