[chronojump/FS-LCD-Menu] Networks put wristband with no network connection but already identified user, do not rename user to



commit af21b14dc73f4d8413a3e0d01ced8aed28fb2b2f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Dec 1 17:43:15 2021 +0100

    Networks put wristband with no network connection but already identified user, do not rename user to "" 
(name on "server")

 src/gui/networks.cs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index ce76e080c..022863753 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -138,6 +138,13 @@ public partial class ChronoJumpWindow
 
                }
 
+               LogB.Information(string.Format("Compujump variables: {0}, {1}, {2}, {3}, {4}",
+                               configChronojump.Compujump,
+                               configChronojump.CompujumpServerURL != null,
+                               configChronojump.CompujumpServerURL != "",
+                               configChronojump.CompujumpStationID != -1,
+                               configChronojump.CompujumpStationMode != Constants.Modes.UNDEFINED));
+
                if(
                                configChronojump.Compujump &&
                                configChronojump.CompujumpServerURL != null &&
@@ -779,7 +786,8 @@ public partial class ChronoJumpWindow
                                        createMonthlySession(yearMonthStr);
 
                                //update person if name changed
-                               if(pServer.Name != pLocal.Name)
+                               //but only if we are connected
+                               if(pServer.Name != null && pServer.Name != "" && pServer.Name != pLocal.Name)
                                {
                                        pLocal.Name = pServer.Name;
                                        SqlitePerson.UpdateName (pLocal.UniqueID, pLocal.Name);


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