Skip to content
This repository was archived by the owner on Jul 25, 2024. It is now read-only.

Fixes #386 : Compose box doesn't auto-open when narrowing #390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,8 @@ public boolean onChildClick(ExpandableListView parent, View v, int groupPosition
String subjectName = ((Cursor) streamsDrawer.getExpandableListAdapter().getChild(groupPosition, childPosition)).getString(0);
onNarrow(new NarrowFilterStream(streamName, subjectName));
onNarrowFillSendBoxStream(streamName, subjectName, false);
hideView(chatBox);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be better to use displayChatbox(boolean) and displayFAB(boolean)

displayFAB(true);
break;
default:
return false;
Expand All @@ -1220,6 +1222,8 @@ public boolean onGroupClick(ExpandableListView expandableListView, View view, in
String streamName = ((TextView) view.findViewById(R.id.name)).getText().toString();
doNarrowToLastRead(streamName);
drawerLayout.openDrawer(GravityCompat.START);
hideView(chatBox);
displayFAB(true);
if (previousClick != -1 && expandableListView.getCount() > previousClick) {
expandableListView.collapseGroup(previousClick);
}
Expand All @@ -1237,6 +1241,8 @@ public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
TextView name = (TextView) view;
final String streamName = cursor.getString(columnIndex);
name.setText(streamName);
hideView(chatBox);
displayFAB(true);
//Change color in the drawer if this stream is inHomeView only.
if (!Stream.getByName(app, streamName).getInHomeView()) {
name.setTextColor(ContextCompat.getColor(ZulipActivity.this, R.color.colorTextTertiary));
Expand Down