fix notification tap initial page view
Some checks failed
Flutter analyze & test / flutter_analyze_and_test (push) Has been cancelled

This commit is contained in:
otsmr 2026-04-12 02:22:30 +02:00
parent cfc6e945da
commit c42ff41eb8
2 changed files with 6 additions and 11 deletions

View file

@ -3,8 +3,9 @@
## 0.1.5
- Fix: Reupload of media files was not working properly
- Fix: Chats where ordered wrongly
- Fix: Typing indicator was not shown always
- Fix: Chats were sometimes ordered wrongly
- Fix: Typing indicator was not always shown
- Fix: Multiple smaller issues
## 0.1.4

View file

@ -101,6 +101,7 @@ class HomeViewState extends State<HomeView> {
if (mounted) setState(() {});
};
activePageIdx = widget.initialPage;
globalUpdateOfHomeViewPageIndex = (index) {
homeViewPageController.jumpToPage(index);
setState(() {
@ -111,9 +112,8 @@ class HomeViewState extends State<HomeView> {
if (response.payload != null &&
response.payload!.startsWith(Routes.chats)) {
await routerProvider.push(response.payload!);
} else {
globalUpdateOfHomeViewPageIndex(0);
}
globalUpdateOfHomeViewPageIndex(0);
});
unawaited(_mainCameraController.selectCamera(0, true));
unawaited(initAsync());
@ -153,20 +153,14 @@ class HomeViewState extends State<HomeView> {
if (widget.initialPage == 0 ||
(notificationAppLaunchDetails != null &&
notificationAppLaunchDetails.didNotificationLaunchApp)) {
var pushed = false;
if (notificationAppLaunchDetails?.didNotificationLaunchApp ?? false) {
final payload =
notificationAppLaunchDetails?.notificationResponse?.payload;
if (payload != null && payload.startsWith(Routes.chats)) {
await routerProvider.push(payload);
pushed = true;
globalUpdateOfHomeViewPageIndex(0);
}
}
if (!pushed) {
globalUpdateOfHomeViewPageIndex(0);
}
}
final draftMedia = await twonlyDB.mediaFilesDao.getDraftMediaFile();