You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2021/03/12 19:14:25 UTC

[GitHub] [fineract-cn-mobile] varsvat commented on a change in pull request #122: Bug: Duplicate Enteries shown in the PlannedPaymentActivity screen until Reloading

varsvat commented on a change in pull request #122:
URL: https://github.com/apache/fineract-cn-mobile/pull/122#discussion_r593391230



##########
File path: app/src/main/java/org/apache/fineract/ui/online/loanaccounts/plannedpayment/PlannedPaymentPresenter.java
##########
@@ -56,7 +56,7 @@ public void detachView() {
     @Override
     public void fetchPlannedPayment(String productIdentifier, String caseIdentifier,
             Integer pageIndex, String initialDisbursalDate, Boolean loadmore) {
-        this.loadmore = loadmore;
+//        this.loadmore = loadmore;

Review comment:
       I won't be able to explain you directly over here😅. It took me also quite a long time to find the flaw in the code. Briefly, I can explain in a way that in this method fetchPlannedPayment , we were first trying to set the boolean for the loadmore variable and then were invoking the fetchPlannedPayment function , but this was where the issue was as in the later function, loadmore is already being set and therefore , at the first time when we launch the plannedpayment Fragment, two times the fetchplannedpayment method is invoked , which leads to loading the data twice in the recyclerView Adapter but then when we refresh it , everything gets sorted. 
   Hope I was able to make it clear :)  




----------------------------------------------------------------
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:
users@infra.apache.org