Skip to content

Commit 9a6bc44

Browse files
authored
Merge pull request #818 from deXol/develop
Do not display more recent backup prompt in MMM, fix #816
2 parents 2d1f265 + 1379ff3 commit 9a6bc44

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/DbBackupsTrackerController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ void DbBackupsTrackerController::askForExportBackup()
157157
}
158158
};
159159

160-
PromptMessage *message = new PromptMessage(tr("Credentials on the device are more recent. ") + "<br>" +
160+
PromptMessage *message = new PromptMessage(PromptWidget::MORE_RECENT_BACKUP_PROMPT + "<br>" +
161161
tr("Do you want to export your database?"),
162162
onAccept, onReject);
163163
window->showPrompt(message);

src/PromptWidget.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
QString PromptWidget::MMM_ERROR = tr("Memory Management Error");
1111
QString PromptWidget::BACKUP_PROMPT = tr("You haven't made a backup of your database in a while. ");
12+
QString PromptWidget::MORE_RECENT_BACKUP_PROMPT = tr("Credentials on the device are more recent. ");
1213

1314
PromptWidget::PromptWidget(QWidget *parent) :
1415
QFrame(parent),
@@ -85,7 +86,8 @@ bool PromptWidget::isMMMErrorPrompt() const
8586

8687
bool PromptWidget::isBackupPrompt() const
8788
{
88-
return m_promptMessage && m_messageLabel->text().contains(BACKUP_PROMPT);
89+
return m_promptMessage && (m_messageLabel->text().contains(BACKUP_PROMPT) ||
90+
m_messageLabel->text().contains(MORE_RECENT_BACKUP_PROMPT));
8991
}
9092

9193
void PromptWidget::onAccepted()

src/PromptWidget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class PromptWidget : public QFrame
5656

5757
static QString MMM_ERROR;
5858
static QString BACKUP_PROMPT;
59+
static QString MORE_RECENT_BACKUP_PROMPT;
5960

6061
signals:
6162
void accepted();

0 commit comments

Comments
 (0)