From 01bded7aa4a78d47c5d121d448f5081334c31664 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Tue, 7 Jun 2022 14:10:06 -0400 Subject: [PATCH] KT: Small fixes --- main.cpp | 6 +----- mainwindow.cpp | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/main.cpp b/main.cpp index 522d66a..fa64d7f 100644 --- a/main.cpp +++ b/main.cpp @@ -76,11 +76,7 @@ int main(int argc, char *argv[]) // Checking if battery level is critical; if true (and if it is not charging), then display a "Please charge your eReader" splash and power off. if(global::deviceID != "emu\n") { if(isBatteryCritical() == true) { - string_checkconfig_ro("/sys/devices/platform/pmic_battery.1/power_supply/mc13892_bat/status"); - if(checkconfig_str_val == "Charging\n") { - ; - } - else { + if(!isUsbPluggedIn()) { global::battery::showCriticalBatteryAlert = true; QApplication a(argc, argv); alert w; diff --git a/mainwindow.cpp b/mainwindow.cpp index bfe86aa..21365d3 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1174,7 +1174,7 @@ void MainWindow::resetFullWindow() { } void MainWindow::setRecentBooksLabelsTruncateThreshold() { - if(global::deviceID == "n705\n" or global::deviceID == "n905b\n" or global::deviceID == "n905c\n" or global::deviceID == "kt\n") { + if(global::deviceID == "n705\n" or global::deviceID == "n905\n" or global::deviceID == "kt\n") { truncateThreshold = 12; } else if(global::deviceID == "n613\n" or global::deviceID == "n873\n" or global::deviceID == "n236\n" or global::deviceID == "n437\n" or global::deviceID == "n306\n"){