Skip to content

Commit a05d381

Browse files
committed
fix(android): removed deprecated topmost()
1 parent 0fb8f3a commit a05d381

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/snackbar/snackbar.android.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Color } from '@nativescript/core/color';
2-
import { topmost } from '@nativescript/core/ui/frame';
2+
import { Frame } from '@nativescript/core/ui/frame';
33
import { DismissReasons, SnackBarAction, SnackBarBase, SnackBarOptions } from './snackbar-common';
44
import { android as androidApp } from '@nativescript/core/application';
55

@@ -52,7 +52,7 @@ export class SnackBar extends SnackBarBase {
5252
options.hideDelay = options.hideDelay ? options.hideDelay : 3000;
5353

5454
const activity = androidApp.foregroundActivity as globalAndroid.app.Activity;
55-
let attachView = options.view || topmost().currentPage;
55+
let attachView = options.view || Frame.topmost().currentPage;
5656
while (attachView['_modal']) {
5757
attachView = attachView['_modal']
5858
}

0 commit comments

Comments
 (0)