Skip to content

Commit 57595f8

Browse files
committed
Fix backup notification ignoring settings
Fixes #1
1 parent 31bf755 commit 57595f8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/GHOSTbackup/GHOSTbackup.Helpers/BackupHelper.vb

+12-4
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,16 @@ Public Class BackupHelper
229229
Form1.LatestBackupHelpLabel.Text = Localization.GetString("ui_tasks_latest") & BackupTimestamp.ToString("G", CultureInfo.CurrentUICulture)
230230

231231
Logger.Log("[INFO] Performed the first backup " & "(" & SavegamesList.Length & " files copied to " & BackupDirectory & ").")
232-
Notification.Show(Localization.GetString("notification_msg_first_backup"))
232+
If Form1.SettingsDisplayNotificationChkBox.Checked = True Then
233+
Notification.Show(Localization.GetString("notification_msg_first_backup"))
234+
End If
233235

234236
Catch ex As Exception
235237
StopBackup()
236238
Logger.Log("[ERROR] Backup interrupted: " & ex.Message())
237-
Notification.Show(Localization.GetString("notification_msg_backup_error"))
239+
If Form1.SettingsDisplayNotificationChkBox.Checked = True Then
240+
Notification.Show(Localization.GetString("notification_msg_backup_error"))
241+
End If
238242
CustomMsgBox.Show(Localization.GetString("msgbox_backup_error"), Localization.GetString("msgbox_backup_error_title"), CustomMsgBoxButtons.OKCancel, CustomMsgBoxIcon.Error)
239243
End Try
240244
Else
@@ -265,12 +269,16 @@ Public Class BackupHelper
265269
Form1.LatestBackupHelpLabel.Text = Localization.GetString("ui_tasks_latest") & BackupTimestamp.ToString("G", CultureInfo.CurrentUICulture)
266270

267271
Logger.Log("[INFO] Backup complete " & "(" & SavegamesList.Length & " files copied to " & BackupDirectory & ").")
268-
Notification.Show(Localization.GetString("notification_msg_backup_complete"))
272+
If Form1.SettingsDisplayNotificationChkBox.Checked = True Then
273+
Notification.Show(Localization.GetString("notification_msg_backup_complete"))
274+
End If
269275

270276
Catch ex As Exception
271277
StopBackup()
272278
Logger.Log("[ERROR] Backup interrupted: " & ex.Message())
273-
Notification.Show(Localization.GetString("notification_msg_backup_error"))
279+
If Form1.SettingsDisplayNotificationChkBox.Checked = True Then
280+
Notification.Show(Localization.GetString("notification_msg_backup_error"))
281+
End If
274282
CustomMsgBox.Show(Localization.GetString("msgbox_backup_error"), Localization.GetString("msgbox_backup_error_title"), CustomMsgBoxButtons.OKCancel, CustomMsgBoxIcon.Error)
275283
End Try
276284
Else

0 commit comments

Comments
 (0)