1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-07 10:46:24 +03:00

emit resize event when banners are shown/hidden to restore scroll pos

This commit is contained in:
Bruno Windels
2019-03-12 17:29:16 +01:00
parent af0a51d3b2
commit 4795625cee
3 changed files with 34 additions and 10 deletions

View File

@@ -220,7 +220,17 @@ const Notifier = {
}
},
isToolbarHidden: function() {
shouldShowToolbar: function() {
const client = MatrixClientPeg.get();
if (!client) {
return false;
}
const isGuest = client.isGuest();
return !isGuest && Notifier.supportsDesktopNotifications() &&
!Notifier.isEnabled() && !Notifier._isToolbarHidden();
},
_isToolbarHidden: function() {
// Check localStorage for any such meta data
if (global.localStorage) {
return global.localStorage.getItem("notifications_hidden") === "true";