[chronojump] intersessions reps now shows also last row



commit b6b454bac59f01057eca220d52034d5f3c5bdce5
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon May 30 16:37:47 2016 +0200

    intersessions reps now shows also last row

 src/sqlite/encoder.cs |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index 1fff941..11c0d0f 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -433,7 +433,6 @@ class SqliteEncoder : Sqlite
                                inactiveThisSession = 0;
                                //empty lDeep
                                lDeep = new List<EncoderPersonCurvesInDBDeep>();
-
                        }
                        //4 add deep info: (weight, all reps)
                        EncoderPersonCurvesInDBDeep deep = new EncoderPersonCurvesInDBDeep(
@@ -443,8 +442,18 @@ class SqliteEncoder : Sqlite
                        
                        activeThisSession += activeThisRow;
                        inactiveThisSession += inactiveThisRow;
-
                }
+               
+               //store last row in array (once we are out the while)
+               if(! firstSession) {
+                       //if is not first session (means we have processed a session before)
+                       //update encPS with the lDeep and then add to array
+                       encPS.lDeep = lDeep;
+                       encPS.countActive = activeThisSession;
+                       encPS.countAll = activeThisSession + inactiveThisSession;
+                       array.Add(encPS);
+               }
+
                reader.Close();
                if(! dbconOpened)
                        Sqlite.Close();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]