@@ -1483,7 +1483,7 @@ public void doDrawer() {
1483
1483
if (Authentication .isLoggedIn && Authentication .didOnline ) {
1484
1484
1485
1485
header = inflater .inflate (R .layout .drawer_loggedin , drawerSubList , false );
1486
- LinearLayout multiReddits = header .findViewById (R .id .multi );
1486
+ RelativeLayout multiReddits = header .findViewById (R .id .multi );
1487
1487
headerMain = header ;
1488
1488
hea = header .findViewById (R .id .back );
1489
1489
@@ -1523,20 +1523,19 @@ public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which)
1523
1523
return true ;
1524
1524
}
1525
1525
});
1526
- LinearLayout multireddits_area = header .findViewById (R .id .multireddits_area );
1526
+ LinearLayout multireddits_area = header .findViewById (R .id .expand_multireddits );
1527
1527
1528
- multireddits_area .setVisibility (View .GONE );
1529
- findViewById (R .id .multireddits_flip ).setOnClickListener (new View .OnClickListener () {
1528
+ findViewById (R .id .godown_multireddits ).setOnClickListener (new View .OnClickListener () {
1530
1529
@ Override
1531
1530
public void onClick (View v ) {
1532
1531
if (multireddits_area .getVisibility () == View .GONE ) {
1533
1532
expand (multireddits_area );
1534
- flipAnimator (false , header .findViewById (R .id .multireddits_flip )).start ();
1535
- header .findViewById (R .id .multireddits_flip ).setContentDescription (getResources ().getString (R .string .btn_collapse ));
1533
+ flipAnimator (false , header .findViewById (R .id .godown_multireddits )).start ();
1534
+ header .findViewById (R .id .godown_multireddits ).setContentDescription (getResources ().getString (R .string .btn_collapse ));
1536
1535
} else {
1537
1536
collapse (multireddits_area );
1538
- flipAnimator (true , header .findViewById (R .id .multireddits_flip )).start ();
1539
- header .findViewById (R .id .multireddits_flip ).setContentDescription (getResources ().getString (R .string .btn_expand ));
1537
+ flipAnimator (true , header .findViewById (R .id .godown_multireddits )).start ();
1538
+ header .findViewById (R .id .godown_multireddits ).setContentDescription (getResources ().getString (R .string .btn_expand ));
1540
1539
}
1541
1540
1542
1541
}
@@ -4848,35 +4847,17 @@ protected Subreddit doInBackground(String... params) {
4848
4847
public class SyncMultiReddits extends AsyncTask <Void , Void , Void > {
4849
4848
@ Override
4850
4849
protected Void doInBackground (Void ... params ) {
4851
- try {
4852
- UserSubscriptions .syncMultiReddits (MainActivity .this );
4853
- } catch (final Exception e ) {
4854
- runOnUiThread (new Runnable () {
4855
- @ Override
4856
- public void run () {
4857
- new AlertDialogWrapper .Builder (MainActivity .this )
4858
- .setTitle (R .string .err_title )
4859
- .setMessage (e instanceof ApiException ? getString (R .string .misc_err ) + ": " + ((ApiException ) e ).getExplanation () + "\n " + getString (R .string .misc_retry ) : getString (R .string .misc_err ))
4860
- .setNeutralButton (R .string .btn_ok , new DialogInterface .OnClickListener () {
4861
- @ Override
4862
- public void onClick (DialogInterface dialogInterface , int i ) {
4863
- finish ();
4864
- }
4865
- }).create ().show ();
4866
- }
4867
- });
4868
- e .printStackTrace ();
4869
- }
4850
+ UserSubscriptions .syncMultiReddits (MainActivity .this );
4870
4851
return null ;
4871
4852
}
4872
4853
4873
4854
@ Override
4874
4855
protected void onPostExecute (Void aVoid ) {
4875
- LinearLayout multireddits_area = headerMain .findViewById (R .id .multireddits_area );
4856
+ LinearLayout multiredditsArea = headerMain .findViewById (R .id .expand_multireddits );
4876
4857
4877
4858
for (MultiReddit multiReddit : UserSubscriptions .multireddits ) {
4878
4859
final View t =
4879
- getLayoutInflater ().inflate (R .layout .multireddit_textview_white , multireddits_area ,
4860
+ getLayoutInflater ().inflate (R .layout .multireddit_textview_white , multiredditsArea ,
4880
4861
false );
4881
4862
((TextView ) t .findViewById (R .id .name )).setText (multiReddit .getDisplayName ());
4882
4863
@@ -4887,7 +4868,7 @@ protected void onPostExecute(Void aVoid) {
4887
4868
startActivity (intent );
4888
4869
});
4889
4870
4890
- multireddits_area .addView (t );
4871
+ multiredditsArea .addView (t );
4891
4872
}
4892
4873
}
4893
4874
}
0 commit comments