From f92ce551cee71c033b3bd14b38bad4d2d1117348 Mon Sep 17 00:00:00 2001 From: vitaminwater Date: Thu, 13 May 2021 07:28:40 +0200 Subject: [PATCH] longer controller search wait. Missing back button on box feed --- lib/pages/add_device/device_wifi/device_wifi_bloc.dart | 8 ++++---- .../feeds/home/box_feeds/local/local_box_feed_page.dart | 1 + lib/pages/settings/auth/login/settings_login_bloc.dart | 6 +++--- lib/pages/settings/auth/login/settings_login_page.dart | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lib/pages/add_device/device_wifi/device_wifi_bloc.dart b/lib/pages/add_device/device_wifi/device_wifi_bloc.dart index dd0026e0..9d95b44a 100644 --- a/lib/pages/add_device/device_wifi/device_wifi_bloc.dart +++ b/lib/pages/add_device/device_wifi/device_wifi_bloc.dart @@ -134,13 +134,13 @@ class DeviceWifiBloc extends Bloc { var ddb = RelDB.get().devicesDAO; Device device = await ddb.getDevice(args.device.id); - yield DeviceWifiBlocStateSearching(1, 5); + yield DeviceWifiBlocStateSearching(1, 10); await RelDB.get().devicesDAO.updateDevice(DevicesCompanion(id: Value(device.id), isReachable: Value(false))); String ip; - for (int i = 0; i < 5; ++i) { - yield DeviceWifiBlocStateSearching(i + 1, 5); - await new Future.delayed(const Duration(seconds: 3)); + for (int i = 0; i < 10; ++i) { + yield DeviceWifiBlocStateSearching(i + 1, 10); + await new Future.delayed(const Duration(seconds: 5)); ip = await DeviceAPI.resolveLocalName(device.mdns); if (ip == "" || ip == null) { continue; diff --git a/lib/pages/feeds/home/box_feeds/local/local_box_feed_page.dart b/lib/pages/feeds/home/box_feeds/local/local_box_feed_page.dart index 1b636256..3639b194 100644 --- a/lib/pages/feeds/home/box_feeds/local/local_box_feed_page.dart +++ b/lib/pages/feeds/home/box_feeds/local/local_box_feed_page.dart @@ -224,6 +224,7 @@ class _LocalBoxFeedPageState extends State { key: Key('feed'), create: (context) => FeedBloc(LocalBoxFeedBlocDelegate(state.box.feed)), child: FeedPage( + automaticallyImplyLeading: true, color: Color(0xff063047), actions: actions, bottomPadding: true, diff --git a/lib/pages/settings/auth/login/settings_login_bloc.dart b/lib/pages/settings/auth/login/settings_login_bloc.dart index 21b48484..dcf09e49 100644 --- a/lib/pages/settings/auth/login/settings_login_bloc.dart +++ b/lib/pages/settings/auth/login/settings_login_bloc.dart @@ -12,11 +12,11 @@ class SettingsLoginBlocEventInit extends SettingsLoginBlocEvent { List get props => []; } -class SettingsLoginBlocEventCreateAccount extends SettingsLoginBlocEvent { +class SettingsLoginBlocEventLogin extends SettingsLoginBlocEvent { final String nickname; final String password; - SettingsLoginBlocEventCreateAccount(this.nickname, this.password); + SettingsLoginBlocEventLogin(this.nickname, this.password); @override List get props => [nickname, password]; @@ -68,7 +68,7 @@ class SettingsLoginBloc extends Bloc { void _handleInput(BuildContext context) { BlocProvider.of(context) - .add(SettingsLoginBlocEventCreateAccount(_nicknameController.value.text, _passwordController.value.text)); + .add(SettingsLoginBlocEventLogin(_nicknameController.value.text, _passwordController.value.text)); } @override