From c5d99a0c83f0d23f58efcd810b6ffdcb80579dfe Mon Sep 17 00:00:00 2001 From: or-else Date: Mon, 19 Aug 2019 11:07:42 +0300 Subject: [PATCH] change signature for consistency --- .../java/co/tinode/tindroid/MessageActivity.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/co/tinode/tindroid/MessageActivity.java b/app/src/main/java/co/tinode/tindroid/MessageActivity.java index 32d88c50d..ff472a14b 100644 --- a/app/src/main/java/co/tinode/tindroid/MessageActivity.java +++ b/app/src/main/java/co/tinode/tindroid/MessageActivity.java @@ -190,13 +190,13 @@ public void onResume() { mTopic = (ComTopic) tinode.getTopic(mTopicName); if (mTopic != null) { UiUtils.setupToolbar(this, mTopic.getPub(), mTopicName, mTopic.getOnline()); - showFragment(FRAGMENT_MESSAGES, false, null); + showFragment(FRAGMENT_MESSAGES, null, false); } else { // New topic by name, either an actual grp* or p2p* topic name or a usr* Log.w(TAG, "Attempt to instantiate an unknown topic: " + mTopicName); UiUtils.setupToolbar(this, null, mTopicName, false); mTopic = (ComTopic) tinode.newTopic(mTopicName, null); - showFragment(FRAGMENT_INVALID, false, null); + showFragment(FRAGMENT_INVALID, null, false); } mTopic.setListener(new TListener()); @@ -248,7 +248,7 @@ private void topicAttach() { public PromisedReply onSuccess(ServerMessage result) { UiUtils.setupToolbar(MessageActivity.this, mTopic.getPub(), mTopicName, mTopic.getOnline()); - showFragment(FRAGMENT_MESSAGES, false, null); + showFragment(FRAGMENT_MESSAGES, null, false); runOnUiThread(new Runnable() { @Override public void run() { @@ -274,7 +274,7 @@ public PromisedReply onFailure(Exception err) { if (!(err instanceof NotConnectedException)) { Log.w(TAG, "Subscribe failed", err); if (err instanceof ServerResponseException) { - showFragment(FRAGMENT_INVALID, false, null); + showFragment(FRAGMENT_INVALID, null, false); } } return null; @@ -311,7 +311,7 @@ public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); switch (id) { case R.id.action_view_contact: - showFragment(FRAGMENT_INFO, true, null); + showFragment(FRAGMENT_INFO,null, false); return true; case R.id.action_archive: @@ -372,7 +372,7 @@ private boolean isFragmentVisible(String tag) { return fragment != null && fragment.isVisible(); } - void showFragment(String tag, boolean addToBackstack, Bundle args) { + void showFragment(String tag, Bundle args, boolean addToBackstack) { FragmentManager fm = getSupportFragmentManager(); Fragment fragment = fm.findFragmentByTag(tag); if (fragment == null) {