Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/components/common/MuteButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ const MuteButton = (props) => {
}

const mapStateToProps = (state) => ({
mutedList: state.profile.get('mutedList'),
mutedListAll: state.profile.get('mutedListAll'),
mutedList: state.profile.get('mutedList')?.toJS ? state.profile.get('mutedList').toJS() : state.profile.get('mutedList'),
mutedListAll: state.profile.get('mutedListAll')?.toJS ? state.profile.get('mutedListAll').toJS() : state.profile.get('mutedListAll'),
})


Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/BlacklistModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ const mapStateToProps = (state) => ({
theme: state.settings.get('theme'),
blacklistModal: state.interfaces.get('blacklistDialog')?.toJS ? state.interfaces.get('blacklistDialog').toJS() : state.interfaces.get('blacklistDialog'),
loading: pending(state, 'BLACKLIST_USER_REQUEST') || pending(state, 'UNBLACKLIST_USER_REQUEST'),
blacklistedList: state.profile.get('blacklistedList'),
blacklistedList: state.profile.get('blacklistedList')?.toJS ? state.profile.get('blacklistedList').toJS() : state.profile.get('blacklistedList'),
})

const mapDispatchToProps = (dispatch) => ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/FollowBlacklistsModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const mapStateToProps = (state) => ({
theme: state.settings.get('theme'),
followBlacklistsDialog: state.interfaces.get('followBlacklistsDialog')?.toJS ? state.interfaces.get('followBlacklistsDialog').toJS() : state.interfaces.get('followBlacklistsDialog'),
loading: pending(state, 'FOLLOW_BLACKLISTS_REQUEST') || pending(state, 'UNFOLLOW_BLACKLISTS_REQUEST'),
followedBlacklist: state.profile.get('followedBlacklist'),
followedBlacklist: state.profile.get('followedBlacklist')?.toJS ? state.profile.get('followedBlacklist').toJS() : state.profile.get('followedBlacklist'),
})

const mapDispatchToProps = (dispatch) => ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/FollowMutedListModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const mapStateToProps = (state) => ({
theme: state.settings.get('theme'),
followMutedModal: state.interfaces.get('followMutedListDialog')?.toJS ? state.interfaces.get('followMutedListDialog').toJS() : state.interfaces.get('followMutedListDialog'),
loading: pending(state, 'FOLLOW_MUTED_LIST_REQUEST') || pending(state, 'UNFOLLOW_MUTED_LIST_REQUEST'),
followedMutedList: state.profile.get('followedMuted'),
followedMutedList: state.profile.get('followedMuted')?.toJS ? state.profile.get('followedMuted').toJS() : state.profile.get('followedMuted'),
})

const mapDispatchToProps = (dispatch) => ({
Expand Down
2 changes: 1 addition & 1 deletion src/components/modals/HideBuzzModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ const mapStateToProps = (state) => ({
theme: state.settings.get('theme'),
hideBuzzDialog: state.interfaces.get('hideBuzzDialog')?.toJS ? state.interfaces.get('hideBuzzDialog').toJS() : state.interfaces.get('hideBuzzDialog'),
loading: pending(state, 'HIDE_BUZZ_REQUEST'),
mutelist: state.auth.get('mutelist'),
mutelist: state.auth.get('mutelist')?.toJS ? state.auth.get('mutelist').toJS() : state.auth.get('mutelist'),
})

const mapDispatchToProps = (dispatch) => ({
Expand Down
6 changes: 5 additions & 1 deletion src/components/modals/MuteModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ const MuteModal = (props) => {
const { muteSuccessCallback } = muteModal

useEffect(() => {
console.log('MuteModal useEffect - muteModal:', muteModal)
console.log('MuteModal useEffect - muteModal type:', typeof muteModal, muteModal?.constructor?.name)
console.log('MuteModal useEffect - has open prop?', muteModal?.hasOwnProperty('open'))
if(muteModal && muteModal.hasOwnProperty('open')) {
const { open, username } = muteModal
console.log('MuteModal opening - open:', open, 'username:', username)
setOpen(open)
setUsername(username)
if(mutelist.includes(username)) {
Expand Down Expand Up @@ -250,7 +254,7 @@ const mapStateToProps = (state) => ({
theme: state.settings.get('theme'),
muteModal: state.interfaces.get('muteDialogUser')?.toJS ? state.interfaces.get('muteDialogUser').toJS() : state.interfaces.get('muteDialogUser'),
loading: pending(state, 'MUTE_USER_REQUEST'),
mutelist: state.auth.get('mutelist'),
mutelist: state.auth.get('mutelist')?.toJS ? state.auth.get('mutelist').toJS() : state.auth.get('mutelist'),
})

const mapDispatchToProps = (dispatch) => ({
Expand Down
4 changes: 3 additions & 1 deletion src/components/pages/Profile/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,8 @@ const Profile = (props) => {
}

const openMuteModal = () => {
console.log('openMuteModal called for username:', username)
console.log('openMuteDialog function:', typeof openMuteDialog)
openMuteDialog(username)
}

Expand Down Expand Up @@ -978,7 +980,7 @@ const mapStateToProps = (state) => ({
loadingFollow: pending(state, 'FOLLOW_REQUEST') || pending(state, 'UNFOLLOW_REQUEST'),
recentFollows: state.posts.get('hasBeenRecentlyFollowed'),
recentUnfollows: state.posts.get('hasBeenRecentlyUnfollowed'),
mutelist: state.auth.get('mutelist'),
mutelist: state.auth.get('mutelist')?.toJS ? state.auth.get('mutelist').toJS() : state.auth.get('mutelist'),
follows: state.profile.get('following'),
})

Expand Down
2 changes: 2 additions & 0 deletions src/store/interface/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,10 @@ export const interfaces = (state = defaultState, { type, payload }) => {
case SET_BUZZ_CONFIRM_MODAL_STATUS:
return state.set('buzzConfirmModalStatus', payload)
case OPEN_MUTE_DIALOG:
console.log('OPEN_MUTE_DIALOG reducer - payload:', payload)
return state.set('muteDialogUser', { open: true, ...payload })
case CLOSE_MUTE_DIALOG:
console.log('CLOSE_MUTE_DIALOG reducer')
return state.set('muteDialogUser', { open: false, username: null })
case OPEN_HIDE_BUZZ_DIALOG:
return state.set('hideBuzzDialog', { open: true, ...payload })
Expand Down