diff --git a/lib/api.dart b/lib/api.dart index 34dfb43b..e098a523 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -341,7 +341,7 @@ class InvenTreeAPI { // Clear the list of available plugins _plugins.clear(); - print("Connecting to ${apiUrl} -> username=${username}"); + debug("Connecting to ${apiUrl} -> username=${username}"); APIResponse response; @@ -434,7 +434,7 @@ class InvenTreeAPI { // Return the received token _token = (data["token"] ?? "") as String; - print("Received token - $_token"); + debug("Received token from server"); // Request user role information (async) getUserRoles(); @@ -448,7 +448,7 @@ class InvenTreeAPI { } void disconnectFromServer() { - print("InvenTreeAPI().disconnectFromServer()"); + debug("API : disconnectFromServer()"); _connected = false; _connecting = false; @@ -504,7 +504,7 @@ class InvenTreeAPI { roles.clear(); - print("Requesting user role data"); + debug("API: Requesting user role data"); // Next we request the permissions assigned to the current user // Note: 2021-02-27 this "roles" feature for the API was just introduced. @@ -534,7 +534,7 @@ class InvenTreeAPI { return; } - print("Requesting plugin information"); + debug("API: getPluginInformation()"); // Request a list of plugins from the server final List results = await InvenTreePlugin().list(); @@ -664,7 +664,7 @@ class InvenTreeAPI { _request.headers.set(HttpHeaders.acceptLanguageHeader, Intl.getCurrentLocale()); } on SocketException catch (error) { - print("SocketException at ${url}: ${error.toString()}"); + debug("SocketException at ${url}: ${error.toString()}"); showServerError(L10().connectionRefused, error.toString()); return; } on TimeoutException { @@ -673,7 +673,7 @@ class InvenTreeAPI { return; } on HandshakeException catch (error) { print("HandshakeException at ${url}:"); - print(error.toString()); + debug(error.toString()); showServerError(L10().serverCertificateError, error.toString()); return; } catch (error, stackTrace) { @@ -1236,8 +1236,6 @@ class InvenTreeAPI { var plugins = getPlugins(mixin: "locate"); - print("locateItemOrLocation"); - if (plugins.isEmpty) { // TODO: Error message return; diff --git a/lib/preferences.dart b/lib/preferences.dart index 961a16bc..b804cbd9 100644 --- a/lib/preferences.dart +++ b/lib/preferences.dart @@ -60,16 +60,11 @@ class InvenTreePreferencesDB { // Get a platform-specific directory where persistent app data can be stored final appDocumentDir = await getApplicationDocumentsDirectory(); - print("Documents Dir: ${appDocumentDir.toString()}"); - - print("Path: ${appDocumentDir.path}"); - // Path with the form: /platform-specific-directory/demo.db final dbPath = join(appDocumentDir.path, "InvenTreeSettings.db"); final database = await databaseFactoryIo.openDatabase(dbPath); - // Any code awaiting the Completer's future will now start executing _dbOpenCompleter.complete(database); } } diff --git a/lib/settings/login.dart b/lib/settings/login.dart index a998af41..e61c08b4 100644 --- a/lib/settings/login.dart +++ b/lib/settings/login.dart @@ -344,7 +344,6 @@ class _ProfileEditState extends State { Uri uri = Uri.parse(value); if (uri.hasScheme) { - print("Scheme: ${uri.scheme}"); if (!["http", "https"].contains(uri.scheme.toLowerCase())) { return L10().serverStart; }