hide notification refactored