-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[IMPROVE] Add emoji picker to iOS #4366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1e97a08
14c31e2
12246bd
b231131
643e1a7
83b7220
524d41e
e3eb91a
4f5b1bd
ede578c
1d5a1ab
b6ad909
2d248fb
5424f34
4eb6023
2c1c0d1
ed92cda
2023e1c
15d6b7e
1782b10
ddbf4dc
ab6e90e
6168401
988da56
bd3d6db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,39 +1,28 @@ | ||
| import React from 'react'; | ||
| import { View } from 'react-native'; | ||
| import { KeyboardRegistry } from 'react-native-ui-lib/keyboard'; | ||
| import { Provider } from 'react-redux'; | ||
|
|
||
| import { store } from '../../lib/store/auxStore'; | ||
| import store from '../../lib/store'; | ||
| import EmojiPicker from '../EmojiPicker'; | ||
| import styles from './styles'; | ||
| import { themes } from '../../lib/constants'; | ||
| import { TSupportedThemes, withTheme } from '../../theme'; | ||
| import { TSupportedThemes } from '../../theme'; | ||
|
|
||
| interface IMessageBoxEmojiKeyboard { | ||
| theme: TSupportedThemes; | ||
| } | ||
|
|
||
| export default class EmojiKeyboard extends React.PureComponent<IMessageBoxEmojiKeyboard, any> { | ||
| private readonly baseUrl: string; | ||
|
|
||
| constructor(props: IMessageBoxEmojiKeyboard) { | ||
| super(props); | ||
| const state = store.getState(); | ||
| this.baseUrl = state.share.server.server || state.server.server; | ||
| } | ||
|
|
||
| onEmojiSelected = (emoji: string) => { | ||
| const EmojiKeyboard = ({ theme }: { theme: TSupportedThemes }) => { | ||
| const onEmojiSelected = (emoji: string) => { | ||
| KeyboardRegistry.onItemSelected('EmojiKeyboard', { emoji }); | ||
| }; | ||
|
|
||
| render() { | ||
| const { theme } = this.props; | ||
| return ( | ||
| return ( | ||
| <Provider store={store}> | ||
| <View | ||
| style={[styles.emojiKeyboardContainer, { borderTopColor: themes[theme].borderColor }]} | ||
| testID='messagebox-keyboard-emoji'> | ||
| <EmojiPicker onEmojiSelected={this.onEmojiSelected} baseUrl={this.baseUrl} theme={theme} /> | ||
| <EmojiPicker onEmojiSelected={onEmojiSelected} theme={theme} /> | ||
| </View> | ||
| ); | ||
| } | ||
| } | ||
| KeyboardRegistry.registerKeyboard('EmojiKeyboard', () => withTheme(EmojiKeyboard)); | ||
| </Provider> | ||
| ); | ||
| }; | ||
|
|
||
| KeyboardRegistry.registerKeyboard('EmojiKeyboard', () => EmojiKeyboard); |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import React from 'react'; | ||
| import { View } from 'react-native'; | ||
|
|
||
| import { isIOS } from '../../lib/methods/helpers'; | ||
| import { ActionsButton, SendButton } from './buttons'; | ||
| import styles from './styles'; | ||
|
|
||
|
|
@@ -18,7 +19,7 @@ const RightButtons = React.memo(({ showSend, submit, showMessageBoxActions, isAc | |
| if (isActionsEnabled) { | ||
| return <ActionsButton onPress={showMessageBoxActions} />; | ||
| } | ||
| return <View style={styles.buttonsWhitespace} />; | ||
| return !isIOS ? <View style={styles.buttonsWhitespace} /> : null; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need this?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I couldn't see a visual difference in this case here.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| }); | ||
|
|
||
| export default RightButtons; | ||
Uh oh!
There was an error while loading. Please reload this page.