mirror of
https://github.com/aljazceru/meshcore-web.git
synced 2025-12-17 08:14:19 +01:00
load battery percentage later
This commit is contained in:
@@ -145,7 +145,6 @@ class Connection {
|
||||
// initial setup without needing database
|
||||
await this.loadSelfInfo();
|
||||
await this.syncDeviceTime();
|
||||
await this.updateBatteryPercentage();
|
||||
|
||||
// wait for database to be ready
|
||||
await databaseToBeReady;
|
||||
@@ -153,6 +152,7 @@ class Connection {
|
||||
// fetch data after database is ready
|
||||
await this.loadContacts();
|
||||
await this.syncMessages();
|
||||
await this.updateBatteryPercentage();
|
||||
|
||||
// auto update battery percentage once per minute
|
||||
setInterval(async () => {
|
||||
@@ -288,10 +288,6 @@ class Connection {
|
||||
await GlobalState.connection.reboot();
|
||||
}
|
||||
|
||||
static async getBatteryVoltage() {
|
||||
return await GlobalState.connection.getBatteryVoltage();
|
||||
}
|
||||
|
||||
static async onContactMessageReceived(message) {
|
||||
|
||||
console.log("onContactMessageReceived", message);
|
||||
|
||||
Reference in New Issue
Block a user