From 0ecff7d43247ead39e8dad7e2bf25508d0ae827d Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Fri, 13 Jul 2018 13:04:50 +0300 Subject: [PATCH 1/2] remove savedInstanceState null check on SettingsActivity --- .../mthmmy/activities/settings/SettingsActivity.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java index 40ade6b7..b57d2c0d 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/settings/SettingsActivity.java @@ -32,12 +32,10 @@ public class SettingsActivity extends BaseActivity { createDrawer(); drawer.setSelection(SETTINGS_ID); - if (savedInstanceState == null) { - preferenceFragment = SettingsFragment.newInstance(sessionManager.isLoggedIn()); - FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); - fragmentTransaction.add(R.id.pref_container, preferenceFragment); - fragmentTransaction.commit(); - } + preferenceFragment = SettingsFragment.newInstance(sessionManager.isLoggedIn()); + FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); + fragmentTransaction.add(R.id.pref_container, preferenceFragment); + fragmentTransaction.commit(); } @Override From 6642910f09ecafe88897d74e5ae7b0bb996e5f47 Mon Sep 17 00:00:00 2001 From: Thodoris1999 Date: Fri, 13 Jul 2018 13:29:22 +0300 Subject: [PATCH 2/2] change to last page when user writes a reply --- .../java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java index a9baf815..f5747998 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/topic/TopicActivity.java @@ -845,6 +845,7 @@ public class TopicActivity extends BaseActivity { @Override protected void onPreExecute() { + changePage(numberOfPages - 1); progressBar.setVisibility(ProgressBar.VISIBLE); paginationEnabled(false); replyFAB.setEnabled(false);