Skip to content

Commit

Permalink
Make image and title optional
Browse files Browse the repository at this point in the history
  • Loading branch information
DuBistKomisch committed May 3, 2021
1 parent 5020f66 commit b185804
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ SnoreToastActions::Actions parse(std::vector<wchar_t *> args)
help(L"Close only works if an -id id was provided.");
}
} else {
hr = (title.length() > 0 && body.length() > 0) ? S_OK : E_FAIL;
hr = (title.length() > 0 || body.length() > 0) ? S_OK : E_FAIL;
if (SUCCEEDED(hr)) {
if (isTextBoxEnabled) {
if (pipe.empty()) {
Expand All @@ -280,9 +280,6 @@ SnoreToastActions::Actions parse(std::vector<wchar_t *> args)
return SnoreToastActions::Actions::Error;
}
}
if (image.empty()) {
image = getIcon();
}
SnoreToasts app(appID);
app.setPipeName(pipe);
app.setApplication(application);
Expand Down

0 comments on commit b185804

Please sign in to comment.