Reduced duration of the annoying notifications

This commit is contained in:
emeric
2018-08-30 11:24:59 +02:00
parent 3b0c025ffb
commit b0956925bd
3 changed files with 7 additions and 5 deletions
+4 -2
View File
@@ -533,7 +533,7 @@ static std::string msgTypeToString(MsgType type)
}
void
LmsApplication::notifyMsg(MsgType type, const Wt::WString& message)
LmsApplication::notifyMsg(MsgType type, const Wt::WString& message, std::chrono::milliseconds duration)
{
LMS_LOG(UI, INFO) << "Notifying message '" << message.toUTF8() << "' of type '" << msgTypeToString(type);
@@ -543,7 +543,9 @@ LmsApplication::notifyMsg(MsgType type, const Wt::WString& message)
"message: '" << message.toUTF8() << "'"
"},{"
"type: '" << msgTypeToString(type) << "',"
"placement: {from: 'top', align: 'center'}"
"placement: {from: 'top', align: 'center'},"
"timer: 250,"
"delay: " << duration.count() << ""
"});";
LmsApp->doJavaScript(oss.str());