Fix media menu closing behaviour
This commit is contained in:
parent
1c461d2449
commit
01c0a08fa8
@ -211,6 +211,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
|||||||
if (_showEntityPageSubscription == null) {
|
if (_showEntityPageSubscription == null) {
|
||||||
_showEntityPageSubscription =
|
_showEntityPageSubscription =
|
||||||
eventBus.on<ShowEntityPageEvent>().listen((event) {
|
eventBus.on<ShowEntityPageEvent>().listen((event) {
|
||||||
|
Logger.d('Showing entity page event handled: ${event.entityId}');
|
||||||
_showEntityPage(event.entityId);
|
_showEntityPage(event.entityId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -309,6 +310,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _showEntityPage(String entityId) {
|
void _showEntityPage(String entityId) {
|
||||||
|
Logger.d('Showing entity page: $entityId');
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
@ -615,7 +617,7 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver, Ticker
|
|||||||
).then((String val) {
|
).then((String val) {
|
||||||
if (val == "play_media") {
|
if (val == "play_media") {
|
||||||
Navigator.pushNamed(context, "/play-media", arguments: {"url": ""});
|
Navigator.pushNamed(context, "/play-media", arguments: {"url": ""});
|
||||||
} else {
|
} else if (val != null) {
|
||||||
_showEntityPage(val);
|
_showEntityPage(val);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user