Refactoring made on offline

This commit is contained in:
Eudes Inácio
2021-10-18 17:42:25 +01:00
parent a9eee0f9a0
commit a21a196248
20 changed files with 1377 additions and 1322 deletions
+10 -1
View File
@@ -19,6 +19,7 @@ import { ExpedienteGdStore } from 'src/app/store/expedientegd-store.service';
import { SqliteService } from 'src/app/services/sqlite.service';
import { synchro } from '../../services/socket/synchro.service';
import { NetworkConnectionService } from 'src/app/services/network-connection.service'
import { BackgroundService } from 'src/app/services/background.service';
@Component({
selector: 'app-events',
@@ -93,7 +94,8 @@ export class EventsPage implements OnInit {
private screenOrientation: ScreenOrientation,
public platform: Platform,
private sqliteservice: SqliteService,
private networkconnection: NetworkConnectionService
private networkconnection: NetworkConnectionService,
private backgroundservice: BackgroundService,
) {
this.existingScreenOrientation = this.screenOrientation.type;
console.log(this.existingScreenOrientation);
@@ -135,6 +137,13 @@ export class EventsPage implements OnInit {
});
this.hideSearch();
this.backgroundservice.registerBackService('Online', () => {
this.showGreeting();
this.RefreshEvents();
this.LoadList();
this.hideSearch();
});
//this.getEventsFromLocalDb();
//this.checkScreenOrientation();