mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 16:07:58 -06:00
fix: Fix scrolling bug on inbox page
This commit is contained in:
@@ -32,7 +32,8 @@ import 'package:responsive_builder/responsive_builder.dart';
|
||||
/// Performs initialization logic.
|
||||
class HomePage extends StatefulWidget {
|
||||
final int paperlessApiVersion;
|
||||
const HomePage({Key? key, required this.paperlessApiVersion}) : super(key: key);
|
||||
const HomePage({Key? key, required this.paperlessApiVersion})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
_HomePageState createState() => _HomePageState();
|
||||
@@ -231,7 +232,8 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
||||
listeners: [
|
||||
BlocListener<ConnectivityCubit, ConnectivityState>(
|
||||
// If app was started offline, load data once it comes back online.
|
||||
listenWhen: (previous, current) => current == ConnectivityState.connected,
|
||||
listenWhen: (previous, current) =>
|
||||
current == ConnectivityState.connected,
|
||||
listener: (context, state) {
|
||||
context.read<LabelRepository>().initialize();
|
||||
context.read<SavedViewRepository>().initialize();
|
||||
@@ -241,7 +243,9 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
||||
listener: (context, state) {
|
||||
if (state.task != null) {
|
||||
// Handle local notifications on task change (only when app is running for now).
|
||||
context.read<LocalNotificationService>().notifyTaskChanged(state.task!);
|
||||
context
|
||||
.read<LocalNotificationService>()
|
||||
.notifyTaskChanged(state.task!);
|
||||
}
|
||||
},
|
||||
),
|
||||
@@ -254,7 +258,9 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
||||
children: [
|
||||
NavigationRail(
|
||||
labelType: NavigationRailLabelType.all,
|
||||
destinations: destinations.map((e) => e.toNavigationRailDestination()).toList(),
|
||||
destinations: destinations
|
||||
.map((e) => e.toNavigationRailDestination())
|
||||
.toList(),
|
||||
selectedIndex: _currentIndex,
|
||||
onDestinationSelected: _onNavigationChanged,
|
||||
),
|
||||
@@ -272,7 +278,8 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
||||
elevation: 4.0,
|
||||
selectedIndex: _currentIndex,
|
||||
onDestinationSelected: _onNavigationChanged,
|
||||
destinations: destinations.map((e) => e.toNavigationDestination()).toList(),
|
||||
destinations:
|
||||
destinations.map((e) => e.toNavigationDestination()).toList(),
|
||||
),
|
||||
body: routes[_currentIndex],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user