forked from glitch-soc/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix privacy dropdown in boost modal on mobile (glitch-soc#1967)
Fixes glitch-soc#1965
- Loading branch information
1 parent
bdc61d4
commit 43dbc62
Showing
7 changed files
with
46 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
app/javascript/flavours/glitch/features/compose/containers/dropdown_container.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { connect } from 'react-redux'; | ||
import { isUserTouching } from 'flavours/glitch/is_mobile'; | ||
import { openModal, closeModal } from 'flavours/glitch/actions/modal'; | ||
import Dropdown from '../components/dropdown'; | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
isUserTouching, | ||
onModalOpen: props => dispatch(openModal('ACTIONS', props)), | ||
onModalClose: () => dispatch(closeModal()), | ||
}); | ||
|
||
export default connect(null, mapDispatchToProps)(Dropdown); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
app/javascript/flavours/glitch/features/compose/containers/privacy_dropdown_container.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { connect } from 'react-redux'; | ||
import PrivacyDropdown from '../components/privacy_dropdown'; | ||
import { changeComposeVisibility } from 'flavours/glitch/actions/compose'; | ||
import { openModal, closeModal } from 'flavours/glitch/actions/modal'; | ||
import { isUserTouching } from 'flavours/glitch/is_mobile'; | ||
|
||
const mapStateToProps = state => ({ | ||
value: state.getIn(['compose', 'privacy']), | ||
}); | ||
|
||
const mapDispatchToProps = dispatch => ({ | ||
|
||
onChange (value) { | ||
dispatch(changeComposeVisibility(value)); | ||
}, | ||
|
||
isUserTouching, | ||
onModalOpen: props => dispatch(openModal('ACTIONS', props)), | ||
onModalClose: () => dispatch(closeModal()), | ||
|
||
}); | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(PrivacyDropdown); |