Commit 73dbba85 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Update RoomFragment.java

parent 0103fdb6
...@@ -2,6 +2,7 @@ package chat.rocket.android.fragment.chatroom; ...@@ -2,6 +2,7 @@ package chat.rocket.android.fragment.chatroom;
import android.Manifest; import android.Manifest;
import android.app.Activity; import android.app.Activity;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.net.Uri; import android.net.Uri;
import android.os.Bundle; import android.os.Bundle;
...@@ -327,7 +328,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements ...@@ -327,7 +328,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
} }
private boolean closeSideMenuIfNeeded() { private boolean closeSideMenuIfNeeded() {
DrawerLayout drawerLayout = (DrawerLayout) rootView.findViewById(R.id.drawer_layout); DrawerLayout drawerLayout = rootView.findViewById(R.id.drawer_layout);
if (drawerLayout != null && drawerLayout.isDrawerOpen(GravityCompat.END)) { if (drawerLayout != null && drawerLayout.isDrawerOpen(GravityCompat.END)) {
drawerLayout.closeDrawer(GravityCompat.END); drawerLayout.closeDrawer(GravityCompat.END);
return true; return true;
...@@ -336,12 +337,12 @@ public class RoomFragment extends AbstractChatRoomFragment implements ...@@ -336,12 +337,12 @@ public class RoomFragment extends AbstractChatRoomFragment implements
} }
private void setupMessageComposer() { private void setupMessageComposer() {
final MessageFormLayout messageFormLayout = (MessageFormLayout) rootView.findViewById(R.id.messageComposer); final MessageFormLayout messageFormLayout = rootView.findViewById(R.id.messageComposer);
messageFormManager = new MessageFormManager(messageFormLayout, this::showExtraActionSelectionDialog); messageFormManager = new MessageFormManager(messageFormLayout, this::showExtraActionSelectionDialog);
messageFormManager.setSendMessageCallback(this::sendMessage); messageFormManager.setSendMessageCallback(this::sendMessage);
messageFormLayout.setEditTextCommitContentListener(this::onCommitContent); messageFormLayout.setEditTextCommitContentListener(this::onCommitContent);
autocompleteManager = new AutocompleteManager((ViewGroup) rootView.findViewById(R.id.messageListRelativeLayout)); autocompleteManager = new AutocompleteManager(rootView.findViewById(R.id.messageListRelativeLayout));
autocompleteManager.registerSource( autocompleteManager.registerSource(
new ChannelSource( new ChannelSource(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment