mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 05:10:15 +02:00
When importing configs via link, don't show dialog twice
This commit is contained in:
@@ -130,13 +130,18 @@ class _HomePageState extends State<HomePage> {
|
|||||||
|
|
||||||
// Check initial link if app was in cold state (terminated)
|
// Check initial link if app was in cold state (terminated)
|
||||||
final appLink = await _appLinks.getInitialLink();
|
final appLink = await _appLinks.getInitialLink();
|
||||||
|
var initLinked = false;
|
||||||
if (appLink != null) {
|
if (appLink != null) {
|
||||||
await interpretLink(appLink);
|
await interpretLink(appLink);
|
||||||
|
initLinked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle link when app is in warm state (front or background)
|
// Handle link when app is in warm state (front or background)
|
||||||
_linkSubscription = _appLinks.uriLinkStream.listen((uri) async {
|
_linkSubscription = _appLinks.uriLinkStream.listen((uri) async {
|
||||||
await interpretLink(uri);
|
if (!initLinked) {
|
||||||
|
await interpretLink(uri);
|
||||||
|
} else {
|
||||||
|
initLinked = false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user