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
274e47f9
Commit
274e47f9
authored
Oct 02, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nullity checks
parent
8d985b42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
27 deletions
+33
-27
RoomFragment.java
...a/chat/rocket/android/fragment/chatroom/RoomFragment.java
+33
-27
No files found.
app/src/main/java/chat/rocket/android/fragment/chatroom/RoomFragment.java
View file @
274e47f9
...
@@ -340,28 +340,30 @@ public class RoomFragment extends AbstractChatRoomFragment implements
...
@@ -340,28 +340,30 @@ public class RoomFragment extends AbstractChatRoomFragment implements
SlidingPaneLayout
subPane
=
getActivity
().
findViewById
(
R
.
id
.
sub_sliding_pane
);
SlidingPaneLayout
subPane
=
getActivity
().
findViewById
(
R
.
id
.
sub_sliding_pane
);
sidebarFragment
=
(
SidebarMainFragment
)
getActivity
().
getSupportFragmentManager
().
findFragmentById
(
R
.
id
.
sidebar_fragment_container
);
sidebarFragment
=
(
SidebarMainFragment
)
getActivity
().
getSupportFragmentManager
().
findFragmentById
(
R
.
id
.
sidebar_fragment_container
);
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
PanelSlideListener
()
{
if
(
pane
!=
null
)
{
@Override
pane
.
setPanelSlideListener
(
new
SlidingPaneLayout
.
PanelSlideListener
()
{
public
void
onPanelSlide
(
View
view
,
float
v
)
{
@Override
messageFormManager
.
enableComposingText
(
false
);
public
void
onPanelSlide
(
View
view
,
float
v
)
{
sidebarFragment
.
clearSearchViewFocus
();
messageFormManager
.
enableComposingText
(
false
);
//Ref: ActionBarDrawerToggle#setProgress
sidebarFragment
.
clearSearchViewFocus
();
toolbar
.
setNavigationIconProgress
(
v
);
//Ref: ActionBarDrawerToggle#setProgress
}
toolbar
.
setNavigationIconProgress
(
v
);
}
@Override
@Override
public
void
onPanelOpened
(
View
view
)
{
public
void
onPanelOpened
(
View
view
)
{
toolbar
.
setNavigationIconVerticalMirror
(
true
);
toolbar
.
setNavigationIconVerticalMirror
(
true
);
}
}
@Override
@Override
public
void
onPanelClosed
(
View
view
)
{
public
void
onPanelClosed
(
View
view
)
{
messageFormManager
.
enableComposingText
(
true
);
messageFormManager
.
enableComposingText
(
true
);
toolbar
.
setNavigationIconVerticalMirror
(
false
);
toolbar
.
setNavigationIconVerticalMirror
(
false
);
subPane
.
closePane
();
subPane
.
closePane
();
closeUserActionContainer
();
closeUserActionContainer
();
}
}
});
});
}
}
}
public
void
closeUserActionContainer
()
{
public
void
closeUserActionContainer
()
{
...
@@ -657,12 +659,16 @@ public class RoomFragment extends AbstractChatRoomFragment implements
...
@@ -657,12 +659,16 @@ public class RoomFragment extends AbstractChatRoomFragment implements
}
}
private
void
showRoomListFragment
(
int
actionId
)
{
private
void
showRoomListFragment
(
int
actionId
)
{
Intent
intent
=
new
Intent
(
getActivity
(),
RoomActivity
.
class
).
putExtra
(
"actionId"
,
actionId
)
//TODO: oddly sometimes getActivity() yields null. Investigate the situations this might happen
.
putExtra
(
"roomId"
,
roomId
)
//and fix it, removing this null-check
.
putExtra
(
"roomType"
,
roomType
)
if
(
getActivity
()
!=
null
)
{
.
putExtra
(
"hostname"
,
hostname
)
Intent
intent
=
new
Intent
(
getActivity
(),
RoomActivity
.
class
).
putExtra
(
"actionId"
,
actionId
)
.
putExtra
(
"token"
,
token
)
.
putExtra
(
"roomId"
,
roomId
)
.
putExtra
(
"userId"
,
userId
);
.
putExtra
(
"roomType"
,
roomType
)
startActivity
(
intent
);
.
putExtra
(
"hostname"
,
hostname
)
.
putExtra
(
"token"
,
token
)
.
putExtra
(
"userId"
,
userId
);
startActivity
(
intent
);
}
}
}
}
}
\ No newline at end of file
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