From abf0d185f5a4abec2111108b8ea27b3f70bb553d Mon Sep 17 00:00:00 2001 From: Damyan Ivanov Date: Sun, 5 May 2019 21:57:25 +0300 Subject: [PATCH] whitespace --- .../ui/activity/MainActivity.java | 59 +++++++++---------- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 5a8e198f..12957e97 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -249,37 +249,36 @@ public class MainActivity extends ProfileThemedActivity { if (mProfileListAdapter == null) mProfileListAdapter = new ProfilesRecyclerViewAdapter(); root.setAdapter(mProfileListAdapter); - mProfileListAdapter.editingProfiles - .observe(this, newValue -> { - if (newValue) { - profileListHeadMore.setVisibility(View.GONE); - profileListHeadCancel.setVisibility(View.VISIBLE); - profileListHeadAddProfile.setVisibility(View.VISIBLE); - if (drawer.isDrawerOpen(GravityCompat.START)) { - profileListHeadMore.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_out)); - profileListHeadCancel.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_in)); - profileListHeadAddProfile.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_in)); - } - } - else { - profileListHeadCancel.setVisibility(View.GONE); - profileListHeadMore.setVisibility(View.VISIBLE); - profileListHeadAddProfile.setVisibility(View.GONE); - if (drawer.isDrawerOpen(GravityCompat.START)) { - profileListHeadCancel.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_out)); - profileListHeadMore.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_in)); - profileListHeadAddProfile.startAnimation(AnimationUtils - .loadAnimation(MainActivity.this, R.anim.fade_out)); - } - } + mProfileListAdapter.editingProfiles.observe(this, newValue -> { + if (newValue) { + profileListHeadMore.setVisibility(View.GONE); + profileListHeadCancel.setVisibility(View.VISIBLE); + profileListHeadAddProfile.setVisibility(View.VISIBLE); + if (drawer.isDrawerOpen(GravityCompat.START)) { + profileListHeadMore.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_out)); + profileListHeadCancel.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_in)); + profileListHeadAddProfile.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_in)); + } + } + else { + profileListHeadCancel.setVisibility(View.GONE); + profileListHeadMore.setVisibility(View.VISIBLE); + profileListHeadAddProfile.setVisibility(View.GONE); + if (drawer.isDrawerOpen(GravityCompat.START)) { + profileListHeadCancel.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_out)); + profileListHeadMore.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_in)); + profileListHeadAddProfile.startAnimation( + AnimationUtils.loadAnimation(MainActivity.this, R.anim.fade_out)); + } + } - mProfileListAdapter.notifyDataSetChanged(); - }); + mProfileListAdapter.notifyDataSetChanged(); + }); LinearLayoutManager llm = new LinearLayoutManager(this); -- 2.39.5