jawidMuhammadi commented on a change in pull request #87:
URL: https://github.com/apache/fineract-cn-mobile/pull/87#discussion_r439286500



##########
File path: 
app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
##########
@@ -166,6 +166,21 @@ public void onBackPressed() {
             new Handler().postDelayed(
                     () -> isBackPressedOnce = false
                     , 2000);
+        } else if (fragment instanceof CustomersFragment) {
+            if (((CustomersFragment) fragment).onBackPressed())
+                super.onBackPressed();
+        } else if (fragment instanceof LedgerFragment) {
+            if (((LedgerFragment) fragment).onBackPressed())
+                super.onBackPressed();
+        } else if (fragment instanceof AccountsFragment) {
+            if (((AccountsFragment) fragment).onBackPressed())
+                super.onBackPressed();
+        } else if (fragment instanceof TellerFragment) {
+            if (((TellerFragment) fragment).onBackPressed())
+                super.onBackPressed();
+        } else if (fragment instanceof ProductFragment) {
+            if (((ProductFragment) fragment).onBackPressed())
+                super.onBackPressed();

Review comment:
       Oh Ookay, so then please try `switch` if you can make it simpler with 
lesser code, otherwise, it looks good to me. :)




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to