2021-04-27 22:06:16 +02:00
|
|
|
import 'package:flutter/foundation.dart';
|
2021-04-10 06:28:12 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
|
|
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
|
|
|
import 'package:kiwi/kiwi.dart';
|
|
|
|
import 'package:logging/logging.dart';
|
|
|
|
import 'package:nc_photos/account.dart';
|
2021-07-25 07:00:38 +02:00
|
|
|
import 'package:nc_photos/app_localizations.dart';
|
2021-04-10 06:28:12 +02:00
|
|
|
import 'package:nc_photos/bloc/list_album.dart';
|
|
|
|
import 'package:nc_photos/entity/album.dart';
|
2021-06-24 18:26:56 +02:00
|
|
|
import 'package:nc_photos/entity/album/provider.dart';
|
2021-04-10 06:28:12 +02:00
|
|
|
import 'package:nc_photos/entity/file.dart';
|
2021-05-24 09:09:25 +02:00
|
|
|
import 'package:nc_photos/entity/file/data_source.dart';
|
2021-04-10 06:28:12 +02:00
|
|
|
import 'package:nc_photos/exception_util.dart' as exception_util;
|
|
|
|
import 'package:nc_photos/iterable_extension.dart';
|
|
|
|
import 'package:nc_photos/k.dart' as k;
|
|
|
|
import 'package:nc_photos/snack_bar_manager.dart';
|
|
|
|
import 'package:nc_photos/theme.dart';
|
|
|
|
import 'package:nc_photos/use_case/remove.dart';
|
|
|
|
import 'package:nc_photos/widget/album_grid_item.dart';
|
2021-07-01 13:32:22 +02:00
|
|
|
import 'package:nc_photos/widget/album_importer.dart';
|
2021-07-13 21:29:52 +02:00
|
|
|
import 'package:nc_photos/widget/album_search_delegate.dart';
|
2021-04-10 06:28:12 +02:00
|
|
|
import 'package:nc_photos/widget/album_viewer.dart';
|
2021-07-31 19:02:41 +02:00
|
|
|
import 'package:nc_photos/widget/archive_browser.dart';
|
2021-07-13 21:29:52 +02:00
|
|
|
import 'package:nc_photos/widget/builder/album_grid_item_builder.dart';
|
2021-06-26 16:28:21 +02:00
|
|
|
import 'package:nc_photos/widget/dynamic_album_viewer.dart';
|
2021-04-10 06:28:12 +02:00
|
|
|
import 'package:nc_photos/widget/home_app_bar.dart';
|
|
|
|
import 'package:nc_photos/widget/new_album_dialog.dart';
|
2021-07-11 06:48:50 +02:00
|
|
|
import 'package:nc_photos/widget/page_visibility_mixin.dart';
|
2021-07-25 16:27:19 +02:00
|
|
|
import 'package:nc_photos/widget/selection_app_bar.dart';
|
2021-04-10 06:28:12 +02:00
|
|
|
import 'package:tuple/tuple.dart';
|
|
|
|
|
|
|
|
class HomeAlbums extends StatefulWidget {
|
|
|
|
HomeAlbums({
|
2021-07-23 22:05:57 +02:00
|
|
|
Key? key,
|
|
|
|
required this.account,
|
2021-04-10 06:28:12 +02:00
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
createState() => _HomeAlbumsState();
|
|
|
|
|
|
|
|
final Account account;
|
|
|
|
}
|
|
|
|
|
2021-07-11 06:48:50 +02:00
|
|
|
class _HomeAlbumsState extends State<HomeAlbums>
|
|
|
|
with RouteAware, PageVisibilityMixin<HomeAlbums> {
|
2021-04-10 06:28:12 +02:00
|
|
|
@override
|
|
|
|
initState() {
|
|
|
|
super.initState();
|
|
|
|
_initBloc();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
build(BuildContext context) {
|
|
|
|
return BlocListener<ListAlbumBloc, ListAlbumBlocState>(
|
|
|
|
bloc: _bloc,
|
|
|
|
listener: (context, state) => _onStateChange(context, state),
|
|
|
|
child: BlocBuilder<ListAlbumBloc, ListAlbumBlocState>(
|
|
|
|
bloc: _bloc,
|
|
|
|
builder: (context, state) => _buildContent(context, state),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void _initBloc() {
|
|
|
|
ListAlbumBloc bloc;
|
|
|
|
final blocId =
|
|
|
|
"${widget.account.scheme}://${widget.account.username}@${widget.account.address}";
|
|
|
|
try {
|
|
|
|
_log.fine("[_initBloc] Resolving bloc for '$blocId'");
|
|
|
|
bloc = KiwiContainer().resolve<ListAlbumBloc>("ListAlbumBloc($blocId)");
|
|
|
|
} catch (e) {
|
|
|
|
// no created instance for this account, make a new one
|
|
|
|
_log.info("[_initBloc] New bloc instance for account: ${widget.account}");
|
|
|
|
bloc = ListAlbumBloc();
|
|
|
|
KiwiContainer().registerInstance<ListAlbumBloc>(bloc,
|
|
|
|
name: "ListAlbumBloc($blocId)");
|
|
|
|
}
|
|
|
|
|
|
|
|
_bloc = bloc;
|
|
|
|
if (_bloc.state is ListAlbumBlocInit) {
|
|
|
|
_log.info("[_initBloc] Initialize bloc");
|
|
|
|
_reqQuery();
|
|
|
|
} else {
|
|
|
|
// process the current state
|
2021-07-23 22:05:57 +02:00
|
|
|
WidgetsBinding.instance!.addPostFrameCallback((_) {
|
2021-07-03 13:32:23 +02:00
|
|
|
setState(() {
|
|
|
|
_onStateChange(context, _bloc.state);
|
|
|
|
});
|
|
|
|
});
|
2021-04-10 06:28:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _buildContent(BuildContext context, ListAlbumBlocState state) {
|
|
|
|
return Stack(
|
|
|
|
children: [
|
|
|
|
Theme(
|
|
|
|
data: Theme.of(context).copyWith(
|
|
|
|
accentColor: AppTheme.getOverscrollIndicatorColor(context),
|
|
|
|
),
|
|
|
|
child: CustomScrollView(
|
|
|
|
slivers: [
|
|
|
|
_buildAppBar(context),
|
|
|
|
SliverPadding(
|
2021-07-05 07:23:01 +02:00
|
|
|
padding: const EdgeInsets.all(8),
|
2021-04-10 06:28:12 +02:00
|
|
|
sliver: SliverStaggeredGrid.extentBuilder(
|
|
|
|
maxCrossAxisExtent: 256,
|
|
|
|
mainAxisSpacing: 8,
|
2021-05-28 21:44:09 +02:00
|
|
|
itemCount: _items.length + (_isSelectionMode ? 0 : 2),
|
2021-04-10 06:28:12 +02:00
|
|
|
itemBuilder: _buildItem,
|
|
|
|
staggeredTileBuilder: (index) {
|
|
|
|
return const StaggeredTile.count(1, 1);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
if (state is ListAlbumBlocLoading)
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
child: const LinearProgressIndicator(),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _buildAppBar(BuildContext context) {
|
|
|
|
if (_isSelectionMode) {
|
|
|
|
return _buildSelectionAppBar(context);
|
|
|
|
} else {
|
|
|
|
return _buildNormalAppBar(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _buildSelectionAppBar(BuildContext conetxt) {
|
2021-07-25 16:27:19 +02:00
|
|
|
return SelectionAppBar(
|
|
|
|
count: _selectedItems.length,
|
|
|
|
onClosePressed: () {
|
|
|
|
setState(() {
|
|
|
|
_selectedItems.clear();
|
|
|
|
});
|
|
|
|
},
|
|
|
|
actions: [
|
|
|
|
IconButton(
|
|
|
|
icon: const Icon(Icons.delete),
|
|
|
|
tooltip: L10n.of(context).deleteSelectedTooltip,
|
2021-04-10 06:28:12 +02:00
|
|
|
onPressed: () {
|
2021-07-25 16:27:19 +02:00
|
|
|
_onSelectionAppBarDeletePressed();
|
2021-04-10 06:28:12 +02:00
|
|
|
},
|
|
|
|
),
|
2021-07-25 16:27:19 +02:00
|
|
|
],
|
2021-04-10 06:28:12 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _buildNormalAppBar(BuildContext context) {
|
|
|
|
return HomeSliverAppBar(
|
|
|
|
account: widget.account,
|
2021-07-16 09:55:04 +02:00
|
|
|
actions: [
|
|
|
|
IconButton(
|
|
|
|
onPressed: () => _onSearchPressed(context),
|
|
|
|
icon: const Icon(Icons.search),
|
2021-07-25 07:00:38 +02:00
|
|
|
tooltip: L10n.of(context).searchTooltip,
|
2021-07-16 09:55:04 +02:00
|
|
|
),
|
|
|
|
],
|
2021-07-01 13:32:22 +02:00
|
|
|
menuActions: [
|
|
|
|
PopupMenuItem(
|
|
|
|
value: _menuValueImport,
|
2021-07-25 07:00:38 +02:00
|
|
|
child: Text(L10n.of(context).importFoldersTooltip),
|
2021-07-01 13:32:22 +02:00
|
|
|
),
|
|
|
|
],
|
|
|
|
onSelectedMenuActions: (option) {
|
|
|
|
switch (option) {
|
|
|
|
case _menuValueImport:
|
|
|
|
_onAppBarImportPressed(context);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
},
|
2021-04-10 06:28:12 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _buildItem(BuildContext context, int index) {
|
|
|
|
if (index < _items.length) {
|
|
|
|
return _buildAlbumItem(context, index);
|
2021-05-28 21:44:09 +02:00
|
|
|
} else if (index == _items.length) {
|
|
|
|
return _buildArchiveItem(context);
|
2021-04-10 06:28:12 +02:00
|
|
|
} else {
|
|
|
|
return _buildNewAlbumItem(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _buildAlbumItem(BuildContext context, int index) {
|
|
|
|
final item = _items[index];
|
2021-07-13 21:29:52 +02:00
|
|
|
return AlbumGridItemBuilder(
|
|
|
|
account: widget.account,
|
|
|
|
album: item.album,
|
2021-04-10 06:28:12 +02:00
|
|
|
isSelected: _selectedItems.contains(item),
|
|
|
|
onTap: () => _onItemTap(item),
|
|
|
|
onLongPress: _isSelectionMode ? null : () => _onItemLongPress(item),
|
2021-07-13 21:29:52 +02:00
|
|
|
).build(context);
|
2021-04-10 06:28:12 +02:00
|
|
|
}
|
|
|
|
|
2021-05-28 21:44:09 +02:00
|
|
|
Widget _buildArchiveItem(BuildContext context) {
|
|
|
|
return AlbumGridItem(
|
|
|
|
cover: ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
child: Container(
|
|
|
|
color: AppTheme.getListItemBackgroundColor(context),
|
|
|
|
constraints: const BoxConstraints.expand(),
|
|
|
|
child: Icon(
|
|
|
|
Icons.archive,
|
|
|
|
color: Colors.white.withOpacity(.8),
|
2021-07-01 19:45:14 +02:00
|
|
|
size: 88,
|
2021-05-28 21:44:09 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2021-07-25 07:00:38 +02:00
|
|
|
title: L10n.of(context).albumArchiveLabel,
|
2021-05-28 21:44:09 +02:00
|
|
|
onTap: () {
|
2021-07-31 19:02:41 +02:00
|
|
|
Navigator.of(context).pushNamed(ArchiveBrowser.routeName,
|
|
|
|
arguments: ArchiveBrowserArguments(widget.account));
|
2021-05-28 21:44:09 +02:00
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2021-04-10 06:28:12 +02:00
|
|
|
Widget _buildNewAlbumItem(BuildContext context) {
|
|
|
|
return AlbumGridItem(
|
|
|
|
cover: ClipRRect(
|
|
|
|
borderRadius: BorderRadius.circular(8),
|
|
|
|
child: Container(
|
2021-05-06 08:26:20 +02:00
|
|
|
color: AppTheme.getListItemBackgroundColor(context),
|
2021-04-10 06:28:12 +02:00
|
|
|
constraints: const BoxConstraints.expand(),
|
2021-04-17 10:59:16 +02:00
|
|
|
child: Icon(
|
2021-04-10 06:28:12 +02:00
|
|
|
Icons.add,
|
2021-04-17 10:59:16 +02:00
|
|
|
color: Colors.white.withOpacity(.8),
|
2021-07-01 19:45:14 +02:00
|
|
|
size: 88,
|
2021-04-10 06:28:12 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2021-07-25 07:00:38 +02:00
|
|
|
title: L10n.of(context).createAlbumTooltip,
|
2021-04-10 06:28:12 +02:00
|
|
|
onTap: () => _onNewAlbumItemTap(context),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void _onStateChange(BuildContext context, ListAlbumBlocState state) {
|
|
|
|
if (state is ListAlbumBlocInit) {
|
|
|
|
_items.clear();
|
|
|
|
} else if (state is ListAlbumBlocSuccess || state is ListAlbumBlocLoading) {
|
|
|
|
_transformItems(state.albums);
|
|
|
|
} else if (state is ListAlbumBlocFailure) {
|
2021-07-03 13:37:17 +02:00
|
|
|
_transformItems(state.albums);
|
2021-07-11 06:48:50 +02:00
|
|
|
if (isPageVisible()) {
|
|
|
|
SnackBarManager().showSnackBar(SnackBar(
|
|
|
|
content: Text(exception_util.toUserString(state.exception, context)),
|
|
|
|
duration: k.snackBarDurationNormal,
|
|
|
|
));
|
|
|
|
}
|
2021-04-10 06:28:12 +02:00
|
|
|
} else if (state is ListAlbumBlocInconsistent) {
|
|
|
|
_reqQuery();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void _onItemTap(_GridItem item) {
|
|
|
|
if (_isSelectionMode) {
|
|
|
|
if (!_items.contains(item)) {
|
|
|
|
_log.warning("[_onItemTap] Item not found in backing list, ignoring");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (_selectedItems.contains(item)) {
|
|
|
|
// unselect
|
|
|
|
setState(() {
|
|
|
|
_selectedItems.remove(item);
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
// select
|
|
|
|
setState(() {
|
|
|
|
_selectedItems.add(item);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
} else {
|
2021-07-16 09:55:04 +02:00
|
|
|
_openAlbum(item.album);
|
2021-04-10 06:28:12 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void _onItemLongPress(_GridItem item) {
|
|
|
|
if (!_items.contains(item)) {
|
|
|
|
_log.warning(
|
|
|
|
"[_onItemLongPress] Item not found in backing list, ignoring");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setState(() {
|
|
|
|
_selectedItems.add(item);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
void _onNewAlbumItemTap(BuildContext context) {
|
|
|
|
showDialog(
|
|
|
|
context: context,
|
|
|
|
builder: (_) => NewAlbumDialog(
|
|
|
|
account: widget.account,
|
|
|
|
),
|
2021-06-29 11:44:35 +02:00
|
|
|
).then((album) {
|
|
|
|
if (album == null || album is! Album) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (album.provider is AlbumDynamicProvider) {
|
|
|
|
// open the album automatically to refresh its content, otherwise it'll
|
|
|
|
// be empty
|
|
|
|
Navigator.of(context).pushNamed(DynamicAlbumViewer.routeName,
|
|
|
|
arguments: DynamicAlbumViewerArguments(widget.account, album));
|
|
|
|
}
|
|
|
|
}).catchError((e, stacktrace) {
|
2021-04-10 06:28:12 +02:00
|
|
|
_log.severe(
|
|
|
|
"[_onNewAlbumItemTap] Failed while showDialog", e, stacktrace);
|
|
|
|
SnackBarManager().showSnackBar(SnackBar(
|
2021-07-25 07:00:38 +02:00
|
|
|
content: Text(L10n.of(context).createAlbumFailureNotification),
|
2021-04-10 06:28:12 +02:00
|
|
|
duration: k.snackBarDurationNormal,
|
|
|
|
));
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-07-01 13:32:22 +02:00
|
|
|
void _onAppBarImportPressed(BuildContext context) {
|
|
|
|
Navigator.of(context).pushNamed(AlbumImporter.routeName,
|
|
|
|
arguments: AlbumImporterArguments(widget.account));
|
|
|
|
}
|
|
|
|
|
2021-04-10 06:28:12 +02:00
|
|
|
Future<void> _onSelectionAppBarDeletePressed() async {
|
|
|
|
SnackBarManager().showSnackBar(SnackBar(
|
2021-07-25 07:00:38 +02:00
|
|
|
content: Text(L10n.of(context)
|
2021-04-10 06:28:12 +02:00
|
|
|
.deleteSelectedProcessingNotification(_selectedItems.length)),
|
|
|
|
duration: k.snackBarDurationShort,
|
|
|
|
));
|
2021-07-23 22:05:57 +02:00
|
|
|
final selectedFiles =
|
|
|
|
_selectedItems.map((e) => e.album.albumFile!).toList();
|
2021-04-10 06:28:12 +02:00
|
|
|
setState(() {
|
|
|
|
_selectedItems.clear();
|
|
|
|
});
|
|
|
|
final fileRepo = FileRepo(FileCachedDataSource());
|
|
|
|
final albumRepo = AlbumRepo(AlbumCachedDataSource());
|
|
|
|
final failures = <File>[];
|
|
|
|
for (final f in selectedFiles) {
|
|
|
|
try {
|
|
|
|
await Remove(fileRepo, albumRepo)(widget.account, f);
|
|
|
|
} catch (e, stacktrace) {
|
2021-04-27 22:06:16 +02:00
|
|
|
_log.shout(
|
|
|
|
"[_onSelectionAppBarDeletePressed] Failed while removing file" +
|
|
|
|
(kDebugMode ? ": ${f.path}" : ""),
|
2021-04-10 06:28:12 +02:00
|
|
|
e,
|
|
|
|
stacktrace);
|
|
|
|
failures.add(f);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (failures.isEmpty) {
|
|
|
|
SnackBarManager().showSnackBar(SnackBar(
|
2021-07-25 07:00:38 +02:00
|
|
|
content: Text(L10n.of(context).deleteSelectedSuccessNotification),
|
2021-04-10 06:28:12 +02:00
|
|
|
duration: k.snackBarDurationNormal,
|
|
|
|
));
|
|
|
|
} else {
|
|
|
|
SnackBarManager().showSnackBar(SnackBar(
|
2021-07-25 07:00:38 +02:00
|
|
|
content: Text(L10n.of(context)
|
2021-04-10 06:28:12 +02:00
|
|
|
.deleteSelectedFailureNotification(failures.length)),
|
|
|
|
duration: k.snackBarDurationNormal,
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-16 09:55:04 +02:00
|
|
|
void _onSearchPressed(BuildContext context) {
|
|
|
|
showSearch(
|
|
|
|
context: context,
|
|
|
|
delegate: AlbumSearchDelegate(context, widget.account),
|
|
|
|
).then((value) {
|
|
|
|
if (value is Album) {
|
|
|
|
_openAlbum(value);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-04-10 06:28:12 +02:00
|
|
|
/// Transform an Album list to grid items
|
|
|
|
void _transformItems(List<Album> albums) {
|
2021-06-27 17:35:40 +02:00
|
|
|
final sortedAlbums = albums
|
|
|
|
.map((e) => Tuple2(e.provider.latestItemTime ?? e.lastUpdated, e))
|
|
|
|
.sorted((a, b) {
|
2021-04-10 06:28:12 +02:00
|
|
|
// then sort in descending order
|
|
|
|
final tmp = b.item1.compareTo(a.item1);
|
|
|
|
if (tmp != 0) {
|
|
|
|
return tmp;
|
|
|
|
} else {
|
|
|
|
return a.item2.name.compareTo(b.item2.name);
|
|
|
|
}
|
|
|
|
}).map((e) => e.item2);
|
|
|
|
_items.clear();
|
|
|
|
_items.addAll(sortedAlbums.map((e) => _GridItem(e)));
|
|
|
|
|
|
|
|
_transformSelectedItems();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Map selected items to the new item list
|
|
|
|
void _transformSelectedItems() {
|
|
|
|
final newSelectedItems = _selectedItems
|
|
|
|
.map((from) {
|
|
|
|
try {
|
|
|
|
return _items.whereType<_GridItem>().firstWhere(
|
2021-07-23 22:05:57 +02:00
|
|
|
(to) => from.album.albumFile!.path == to.album.albumFile!.path);
|
2021-04-10 06:28:12 +02:00
|
|
|
} catch (_) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
})
|
2021-07-23 22:05:57 +02:00
|
|
|
.whereType<_GridItem>()
|
2021-04-10 06:28:12 +02:00
|
|
|
.toList();
|
|
|
|
_selectedItems
|
|
|
|
..clear()
|
|
|
|
..addAll(newSelectedItems);
|
|
|
|
}
|
|
|
|
|
2021-07-16 09:55:04 +02:00
|
|
|
void _openAlbum(Album album) {
|
|
|
|
if (album.provider is AlbumStaticProvider) {
|
|
|
|
Navigator.of(context).pushNamed(AlbumViewer.routeName,
|
|
|
|
arguments: AlbumViewerArguments(widget.account, album));
|
|
|
|
} else {
|
|
|
|
Navigator.of(context).pushNamed(DynamicAlbumViewer.routeName,
|
|
|
|
arguments: DynamicAlbumViewerArguments(widget.account, album));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-10 06:28:12 +02:00
|
|
|
void _reqQuery() {
|
|
|
|
_bloc.add(ListAlbumBlocQuery(widget.account));
|
|
|
|
}
|
|
|
|
|
|
|
|
bool get _isSelectionMode => _selectedItems.isNotEmpty;
|
|
|
|
|
2021-07-23 22:05:57 +02:00
|
|
|
late ListAlbumBloc _bloc;
|
2021-04-10 06:28:12 +02:00
|
|
|
|
|
|
|
final _items = <_GridItem>[];
|
|
|
|
final _selectedItems = <_GridItem>[];
|
|
|
|
|
|
|
|
static final _log = Logger("widget.home_albums._HomeAlbumsState");
|
2021-07-01 13:32:22 +02:00
|
|
|
static const _menuValueImport = 0;
|
2021-04-10 06:28:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
class _GridItem {
|
|
|
|
_GridItem(this.album);
|
|
|
|
|
|
|
|
Album album;
|
|
|
|
}
|