Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-22757 Fix for date toast placement in web mobile view #5090

Merged
merged 8 commits into from
Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change default value in reducer
  • Loading branch information
sudheerDev committed Mar 25, 2020
commit 7512c38861839dacd77bc752c55ae9f18e3b8819
2 changes: 1 addition & 1 deletion components/toast_wrapper/toast_wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ToastWrapper extends React.PureComponent {
componentDidMount() {
this.mounted = true;
const {showUnreadToast, showNewMessagesToast, showMessageHistoryToast} = this.state;
const toastPresent = showUnreadToast || showNewMessagesToast || showMessageHistoryToast;
const toastPresent = Boolean(showUnreadToast || showNewMessagesToast || showMessageHistoryToast);
document.addEventListener('keydown', this.handleShortcut);
this.props.actions.updateToastStatus(toastPresent);
}
Expand Down
2 changes: 1 addition & 1 deletion reducers/views/channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function lastGetPosts(state = {}, action) {
}
}

function toastStatus(state = {}, action) {
function toastStatus(state = false, action) {
switch (action.type) {
case ActionTypes.SELECT_CHANNEL_WITH_MEMBER:
return false;
Expand Down