@@ -396,7 +396,9 @@ public void onItemClick(AdapterView<?> parent, View view,
396
396
if (id == allPeopleId ) {
397
397
doNarrow (new NarrowFilterAllPMs (app .getYou ()));
398
398
} else {
399
- narrow_pm_with (Person .getById (app , (int ) id ));
399
+ Person person = Person .getById (app , (int ) id );
400
+ narrowPMWith (person );
401
+ switchToPrivate ();
400
402
}
401
403
}
402
404
});
@@ -569,6 +571,7 @@ public void onBackStackChanged() {
569
571
if (narrowedList == null ) {
570
572
calendar = Calendar .getInstance ();
571
573
menu .getItem (2 ).getSubMenu ().getItem (0 ).setTitle (R .string .menu_today );
574
+ switchToStream ();
572
575
checkForChatBoxFocusRequest ();
573
576
} else if (narrowedList .filter instanceof NarrowFilterByDate ) {
574
577
menu .getItem (2 ).getSubMenu ().getItem (0 ).setTitle (R .string .menu_one_day_before );
@@ -578,7 +581,7 @@ public void onBackStackChanged() {
578
581
}
579
582
580
583
private void checkForChatBoxFocusRequest () {
581
- if (TextUtils .isEmpty (streamActv .getText ().toString ())) {
584
+ if (TextUtils .isEmpty (streamActv .getText ().toString ()) && isCurrentModeStream () ) {
582
585
streamActv .requestFocus ();
583
586
} else if (TextUtils .isEmpty (topicActv .getText ().toString ())) {
584
587
topicActv .requestFocus ();
@@ -1083,6 +1086,7 @@ private void displayChatBox(boolean show) {
1083
1086
showView (chatBox );
1084
1087
} else {
1085
1088
hideView (chatBox );
1089
+ hideSoftKeyBoard ();
1086
1090
}
1087
1091
}
1088
1092
@@ -1203,6 +1207,7 @@ public boolean onGroupClick(ExpandableListView expandableListView, View view, in
1203
1207
}
1204
1208
expandableListView .expandGroup (position );
1205
1209
previousClick = position ;
1210
+ onNarrowFillSendBoxStream (streamName , "" , false );
1206
1211
return true ;
1207
1212
}
1208
1213
});
@@ -1743,8 +1748,9 @@ protected void narrow(final Stream stream) {
1743
1748
doNarrow (new NarrowFilterStream (stream , null ));
1744
1749
}
1745
1750
1746
- private void narrow_pm_with (final Person person ) {
1747
1751
doNarrow (new NarrowFilterPM (Arrays .asList (app .getYou (), person )));
1752
+ private void narrowPMWith (final Person person ) {
1753
+ onNarrowFillSendBoxPrivate (new Person []{person },false );
1748
1754
}
1749
1755
1750
1756
@ TargetApi (Build .VERSION_CODES .HONEYCOMB )
0 commit comments