Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
975bedbd
Commit
975bedbd
authored
Oct 09, 2017
by
Leonardo Aramaki
Committed by
GitHub
Oct 09, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #515 from RocketChat/fix/pane-npe
[FIX] Null Pointer Exception on Sliding Pane
parents
07249af7
d26493d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
RoomFragment.java
...a/chat/rocket/android/fragment/chatroom/RoomFragment.java
+6
-8
No files found.
app/src/main/java/chat/rocket/android/fragment/chatroom/RoomFragment.java
View file @
975bedbd
...
...
@@ -133,7 +133,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
private
RoomToolbar
toolbar
;
private
SlidingPaneLayout
p
ane
;
private
Optional
<
SlidingPaneLayout
>
optionalP
ane
;
private
SidebarMainFragment
sidebarFragment
;
public
RoomFragment
()
{
...
...
@@ -202,7 +202,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
@Override
protected
void
onSetupView
()
{
pane
=
getActivity
().
findViewById
(
R
.
id
.
sliding_pane
);
optionalPane
=
Optional
.
ofNullable
(
getActivity
().
findViewById
(
R
.
id
.
sliding_pane
)
);
messageRecyclerView
=
rootView
.
findViewById
(
R
.
id
.
messageRecyclerView
);
messageListAdapter
=
new
MessageListAdapter
(
getContext
(),
hostname
);
...
...
@@ -302,11 +302,11 @@ public class RoomFragment extends AbstractChatRoomFragment implements
toolbar
.
getMenu
().
clear
();
toolbar
.
inflateMenu
(
R
.
menu
.
menu_room
);
toolbar
.
setNavigationOnClickListener
(
view
->
{
optionalPane
.
ifPresent
(
pane
->
toolbar
.
setNavigationOnClickListener
(
view
->
{
if
(
pane
.
isSlideable
()
&&
!
pane
.
isOpen
())
{
pane
.
openPane
();
}
});
})
)
;
toolbar
.
setOnMenuItemClickListener
(
menuItem
->
{
switch
(
menuItem
.
getItemId
())
{
...
...
@@ -333,8 +333,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
SlidingPaneLayout
subPane
=
getActivity
().
findViewById
(
R
.
id
.
sub_sliding_pane
);
sidebarFragment
=
(
SidebarMainFragment
)
getActivity
().
getSupportFragmentManager
().
findFragmentById
(
R
.
id
.
sidebar_fragment_container
);
if
(
pane
!=
null
)
{
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
PanelSlideListener
()
{
optionalPane
.
ifPresent
(
pane
->
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
PanelSlideListener
()
{
@Override
public
void
onPanelSlide
(
View
view
,
float
v
)
{
messageFormManager
.
enableComposingText
(
false
);
...
...
@@ -355,8 +354,7 @@ public class RoomFragment extends AbstractChatRoomFragment implements
subPane
.
closePane
();
closeUserActionContainer
();
}
});
}
}));
}
public
void
closeUserActionContainer
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment