Skip to content
This repository was archived by the owner on Dec 19, 2021. It is now read-only.

Commit dffe9ae

Browse files
committed
fix(android): activity handling stability
1 parent f5d34be commit dffe9ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/loading-indicator.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class LoadingIndicator {
4747
}
4848

4949
show(options?: OptionsCommon) {
50-
const context = Utils.android.getApplicationContext();
50+
const context = Application.android.foregroundActivity || Application.android.startActivity;
5151
if (context) {
5252
options = options || {};
5353
options.android = options.android || {};
@@ -56,7 +56,7 @@ export class LoadingIndicator {
5656

5757
if (!this._popOver) {
5858
this._isCreatingPopOver = true;
59-
new Promise((resolve) => {
59+
new Promise<void>((resolve) => {
6060
this._createPopOver(context, options);
6161
this._loadersInstances.push(this._popOver);
6262
resolve();

0 commit comments

Comments
 (0)