Skip to content

Commit

Permalink
avoid logging warnings for minor user-triggered events
Browse files Browse the repository at this point in the history
  • Loading branch information
d99kris committed Aug 10, 2024
1 parent 705fb8f commit 2ae9560
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/nmail.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
.TH NMAIL "1" "August 2024" "nmail 5.1.11" "User Commands"
.TH NMAIL "1" "August 2024" "nmail 5.1.12" "User Commands"
.SH NAME
nmail \- ncurses mail
.SH SYNOPSIS
Expand Down
24 changes: 20 additions & 4 deletions src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2605,12 +2605,28 @@ void Ui::ViewMessageListKeyHandler(int p_Key)
else if (p_Key == m_KeyExtHtmlViewer)
{
UpdateUidFromIndex(true /* p_UserTriggered */);
ExtHtmlViewer();
const int uid = m_CurrentFolderUid.second;
if (uid != -1)
{
ExtHtmlViewer();
}
else
{
SetDialogMessage("No message to view");
}
}
else if (p_Key == m_KeyExtMsgViewer)
{
UpdateUidFromIndex(true /* p_UserTriggered */);
ExtMsgViewer();
const int uid = m_CurrentFolderUid.second;
if (uid != -1)
{
ExtMsgViewer();
}
else
{
SetDialogMessage("No message to view");
}
}
else if ((p_Key == m_KeyFilterSortReset) && !m_MessageListSearch)
{
Expand Down Expand Up @@ -5999,13 +6015,13 @@ void Ui::StartSync()
{
if (m_SyncState != SyncStateIdle)
{
SetDialogMessage("Sync already in progress", true /* p_Warn */);
SetDialogMessage("Sync already in progress");
return;
}

if (!IsConnected())
{
SetDialogMessage("Cannot sync while offline", true /* p_Warn */);
SetDialogMessage("Cannot sync while offline");
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "version.h"

#define NMAIL_VERSION "5.1.11"
#define NMAIL_VERSION "5.1.12"

std::string Version::GetBuildOs()
{
Expand Down

0 comments on commit 2ae9560

Please sign in to comment.