refactor: Application modules to classes

This commit is contained in:
Igor Randjelovic
2023-05-10 22:08:01 +02:00
parent 7650cdd890
commit fc01f8e79f
50 changed files with 5438 additions and 2985 deletions

View File

@ -1,10 +1,13 @@
import * as common from './application-settings-common';
import { getNativeApplication } from '../application';
import { Application } from '../application';
let sharedPreferences: android.content.SharedPreferences;
function ensureSharedPreferences() {
if (!sharedPreferences) {
sharedPreferences = (<android.app.Application>getNativeApplication()).getApplicationContext().getSharedPreferences('prefs.db', 0);
sharedPreferences = Application.android
.getNativeApplication()
.getApplicationContext()
.getSharedPreferences('prefs.db', 0);
}
}