This repository was archived by the owner on Jul 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-12
lines changed
app/src/main/java/com/zulip/android/activities Expand file tree Collapse file tree 1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -460,27 +460,24 @@ public void onListResume(MessageListFragment list) {
460
460
currentList = list ;
461
461
462
462
NarrowFilter filter = list .filter ;
463
-
464
463
if (filter == null ) {
465
- if (android .os .Build .VERSION .SDK_INT >= 11 ) {
466
- getActionBar ().setTitle ("Zulip" );
467
- getActionBar ().setSubtitle (null );
468
- }
464
+ setupTitleBar (getString (R .string .app_name ), null );
469
465
this .drawerToggle .setDrawerIndicatorEnabled (true );
470
466
} else {
471
- String title = list .filter .getTitle ();
472
- if (android .os .Build .VERSION .SDK_INT >= 11 ) {
473
- if (title != null ) {
474
- getActionBar ().setTitle (title );
475
- }
476
- getActionBar ().setSubtitle (list .filter .getSubtitle ());
477
- }
467
+ setupTitleBar (filter .getTitle (), filter .getSubtitle ());
478
468
this .drawerToggle .setDrawerIndicatorEnabled (false );
479
469
}
480
470
481
471
this .drawerLayout .closeDrawers ();
482
472
}
483
473
474
+ private void setupTitleBar (String title , String subtitle ) {
475
+ if (android .os .Build .VERSION .SDK_INT >= 11 && getActionBar () != null ) {
476
+ if (title != null ) getActionBar ().setTitle (title );
477
+ getActionBar ().setSubtitle (subtitle );
478
+ }
479
+ }
480
+
484
481
public void doNarrow (NarrowFilter filter ) {
485
482
narrowedList = MessageListFragment .newInstance (filter );
486
483
// Push to the back stack if we are not already narrowed
You can’t perform that action at this time.
0 commit comments