mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-09 02:07:58 -06:00
Fixed bugs, added serialization for documents state
This commit is contained in:
@@ -28,10 +28,13 @@ class TextQueryFormField extends StatelessWidget {
|
||||
prefixIcon: const Icon(Icons.search_outlined),
|
||||
labelText: _buildLabelText(context, field.value!.queryType),
|
||||
suffixIcon: PopupMenuButton<QueryType>(
|
||||
enabled: !onlyExtendedQueryAllowed,
|
||||
color: onlyExtendedQueryAllowed
|
||||
? Theme.of(context).disabledColor
|
||||
icon: onlyExtendedQueryAllowed
|
||||
? Icon(
|
||||
Icons.more_vert,
|
||||
color: Theme.of(context).disabledColor,
|
||||
)
|
||||
: null,
|
||||
enabled: !onlyExtendedQueryAllowed,
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
child: ListTile(
|
||||
@@ -59,7 +62,6 @@ class TextQueryFormField extends StatelessWidget {
|
||||
onSelected: (selection) {
|
||||
field.didChange(field.value?.copyWith(queryType: selection));
|
||||
},
|
||||
child: const Icon(Icons.more_vert),
|
||||
),
|
||||
),
|
||||
onChanged: (value) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:paperless_api/paperless_api.dart';
|
||||
@@ -36,8 +38,15 @@ class _DocumentsPageAppBarState extends State<DocumentsPageAppBar> {
|
||||
return BlocBuilder<DocumentsCubit, DocumentsState>(
|
||||
builder: (context, documentsState) {
|
||||
final hasSelection = documentsState.selection.isNotEmpty;
|
||||
// final PreferredSize? loadingWidget = documentsState.isLoading
|
||||
// ? const PreferredSize(
|
||||
// child: LinearProgressIndicator(),
|
||||
// preferredSize: Size.fromHeight(4.0),
|
||||
// )
|
||||
// : null;
|
||||
if (hasSelection) {
|
||||
return SliverAppBar(
|
||||
// bottom: loadingWidget,
|
||||
expandedHeight: kToolbarHeight + flexibleAreaHeight,
|
||||
snap: true,
|
||||
floating: true,
|
||||
@@ -62,6 +71,7 @@ class _DocumentsPageAppBarState extends State<DocumentsPageAppBar> {
|
||||
);
|
||||
} else {
|
||||
return SliverAppBar(
|
||||
// bottom: loadingWidget,
|
||||
expandedHeight: kToolbarHeight + flexibleAreaHeight,
|
||||
snap: true,
|
||||
floating: true,
|
||||
|
||||
Reference in New Issue
Block a user