mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Avoid potential useless comparison
This commit is contained in:
parent
c04c9ae7b0
commit
93a1d376b8
1 changed files with 3 additions and 2 deletions
|
@ -7,6 +7,7 @@ import 'package:flutter/widgets.dart';
|
|||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:nc_photos/iterable_extension.dart';
|
||||
import 'package:nc_photos/k.dart' as k;
|
||||
import 'package:nc_photos/platform/k.dart' as platform_k;
|
||||
import 'package:nc_photos/session_storage.dart';
|
||||
|
@ -123,7 +124,7 @@ mixin SelectableItemStreamListMixin<T extends StatefulWidget> on State<T> {
|
|||
|
||||
void _onItemTap(SelectableItem item, int index) {
|
||||
if (isSelectionMode) {
|
||||
if (!_items.contains(item)) {
|
||||
if (!_items.containsIdentical(item)) {
|
||||
_log.warning("[_onItemTap] Item not found in backing list, ignoring");
|
||||
return;
|
||||
}
|
||||
|
@ -156,7 +157,7 @@ mixin SelectableItemStreamListMixin<T extends StatefulWidget> on State<T> {
|
|||
}
|
||||
|
||||
void _onItemLongPress(SelectableItem item, int index) {
|
||||
if (!_items.contains(item)) {
|
||||
if (!_items.containsIdentical(item)) {
|
||||
_log.warning(
|
||||
"[_onItemLongPress] Item not found in backing list, ignoring");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue