Commit d9deb324 authored by Varun Patil's avatar Varun Patil

Fix messed up convention in Utils

parent 339a790b
...@@ -142,21 +142,21 @@ public final class Utils { ...@@ -142,21 +142,21 @@ public final class Utils {
public static BodyFragment getBodyFragment(Body body, boolean sharedElements) { public static BodyFragment getBodyFragment(Body body, boolean sharedElements) {
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putString(Constants.BODY_JSON, new Gson().toJson(body)); bundle.putString(Constants.BODY_JSON, new Gson().toJson(body));
bundle.putBoolean(Constants.NO_SHARED_ELEM, sharedElements); bundle.putBoolean(Constants.NO_SHARED_ELEM, !sharedElements);
BodyFragment bodyFragment = new BodyFragment(); BodyFragment bodyFragment = new BodyFragment();
bodyFragment.setArguments(bundle); bodyFragment.setArguments(bundle);
return bodyFragment; return bodyFragment;
} }
public static void openBodyFragment(Body body, FragmentActivity fragmentActivity) { public static void openBodyFragment(Body body, FragmentActivity fragmentActivity) {
updateFragment(getBodyFragment(body, true), fragmentActivity); updateFragment(getBodyFragment(body, false), fragmentActivity);
} }
public static void openBodyFragment(Body body, Fragment currentFragment, View sharedAvatar) { public static void openBodyFragment(Body body, Fragment currentFragment, View sharedAvatar) {
Map<View, String> sharedElements = new HashMap<>(); Map<View, String> sharedElements = new HashMap<>();
sharedElements.put(sharedAvatar, "sharedAvatar"); sharedElements.put(sharedAvatar, "sharedAvatar");
updateSharedElementFragment( updateSharedElementFragment(
getBodyFragment(body, false), currentFragment, sharedElements getBodyFragment(body, true), currentFragment, sharedElements
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment