From d10a064dfe4dc871930b1ce8163c2d4437de87b8 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Fri, 26 Jul 2019 10:56:27 +0200 Subject: [PATCH] [Store] Better debugs --- lib/src/Store.dart | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/src/Store.dart b/lib/src/Store.dart index 1a6ac85..8073e53 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -59,7 +59,8 @@ class Store { onCreate: (Database db, int version) async { await createTables(db); }, onUpgrade: (Database db, int oldVersion, int newVersion) async { - print("Migrate databse from version $oldVersion to $newVersion"); + if (client.debug) + ("[Store] Migrate databse from version $oldVersion to $newVersion"); if (oldVersion != newVersion) { await db.execute("DROP TABLE IF EXISTS Rooms"); await db.execute("DROP TABLE IF EXISTS Participants"); @@ -90,7 +91,8 @@ class Store { ? null : clientList["prev_batch"], ); - print("Restore client credentials of ${client.userID}"); + if (client.debug) + print("[Store] Restore client credentials of ${client.userID}"); } else client.connection.onLoginStateChanged.add(LoginState.loggedOut); }