mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-02 14:35:21 +00:00
Only initialise EmojiGrid when not in edit mode
Suppress initialisation of the emoji_grid_layout.xml when the EmojiDrawer is being used in a layout where the editor is shown, to prevent an NPE when an editor is being used. // FREEBIE Closes #2288
This commit is contained in:
parent
fe5fc411a7
commit
b8ca0e57ad
@ -74,8 +74,11 @@ public class EmojiDrawer extends KeyboardAwareLinearLayout {
|
|||||||
inflater.inflate(R.layout.emoji_drawer, this, true);
|
inflater.inflate(R.layout.emoji_drawer, this, true);
|
||||||
|
|
||||||
initializeResources();
|
initializeResources();
|
||||||
|
|
||||||
|
if (!this.isInEditMode()) {
|
||||||
initializeEmojiGrid();
|
initializeEmojiGrid();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void initializeResources() {
|
private void initializeResources() {
|
||||||
this.pager = (ViewPager ) findViewById(R.id.emoji_pager);
|
this.pager = (ViewPager ) findViewById(R.id.emoji_pager);
|
||||||
|
Loading…
Reference in New Issue
Block a user