diff --git a/Assistant/WebApp/SideBar.hs b/Assistant/WebApp/SideBar.hs index a4b8378979..4373b5a5b0 100644 --- a/Assistant/WebApp/SideBar.hs +++ b/Assistant/WebApp/SideBar.hs @@ -20,6 +20,7 @@ import Utility.Yesod import Yesod import Data.Text (Text) import qualified Data.Map as M +import Control.Concurrent sideBarDisplay :: Widget sideBarDisplay = do @@ -75,6 +76,13 @@ getSideBarR :: NotificationId -> Handler RepHtml getSideBarR nid = do waitNotifier alertNotifier nid + {- This 0.1 second delay avoids very transient notifications from + - being displayed and churning the sidebar unnecesarily. + - + - This needs to be below the level perceptable by the user, + - to avoid slowing down user actions like closing alerts. -} + liftIO $ threadDelay 100000 + page <- widgetToPageContent sideBarDisplay hamletToRepHtml $ [hamlet|^{pageBody page}|]