mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Remove obsolete native event handler
This commit is contained in:
parent
7bb2f2452a
commit
b2c1c39abb
2 changed files with 0 additions and 26 deletions
|
@ -63,8 +63,6 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
|
|||
_subscriptions.add(accountPrefController.shareFolder.listen((event) {
|
||||
add(_SetShareFolder(event));
|
||||
}));
|
||||
|
||||
_nativeFileExifUpdatedListener?.begin();
|
||||
}
|
||||
|
||||
@override
|
||||
|
@ -72,7 +70,6 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
|
|||
for (final s in _subscriptions) {
|
||||
s.cancel();
|
||||
}
|
||||
_nativeFileExifUpdatedListener?.end();
|
||||
return super.close();
|
||||
}
|
||||
|
||||
|
@ -322,14 +319,6 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
|
|||
emit(state.copyWith(error: ExceptionEvent(ev.error, ev.stackTrace)));
|
||||
}
|
||||
|
||||
void _onNativeFileExifUpdated(FileExifUpdatedEvent ev) {
|
||||
_log.info(ev);
|
||||
_refreshThrottler.trigger(
|
||||
maxResponceTime: const Duration(seconds: 3),
|
||||
maxPendingCount: 10,
|
||||
);
|
||||
}
|
||||
|
||||
Future _transformItems(List<FileDescriptor> files) async {
|
||||
_log.info("[_transformItems] Queue ${files.length} items");
|
||||
_itemTransformerQueue.addJob(
|
||||
|
@ -419,18 +408,6 @@ class _Bloc extends Bloc<_Event, _State> with BlocLogger {
|
|||
final _subscriptions = <StreamSubscription>[];
|
||||
var _isHandlingError = false;
|
||||
var _isInitialLoad = true;
|
||||
|
||||
// Listen to updates from background isolates as the memories are not shared
|
||||
late final _nativeFileExifUpdatedListener =
|
||||
getRawPlatform() == NpPlatform.android
|
||||
? NativeEventListener<FileExifUpdatedEvent>(_onNativeFileExifUpdated)
|
||||
: null;
|
||||
late final _refreshThrottler = Throttler(
|
||||
onTriggered: (_) {
|
||||
add(const _Reload());
|
||||
},
|
||||
logTag: _log.name,
|
||||
);
|
||||
}
|
||||
|
||||
_ItemTransformerResult _buildItem(_ItemTransformerArgument arg) {
|
||||
|
|
|
@ -29,7 +29,6 @@ import 'package:nc_photos/entity/collection.dart';
|
|||
import 'package:nc_photos/entity/file_descriptor.dart';
|
||||
import 'package:nc_photos/entity/file_util.dart' as file_util;
|
||||
import 'package:nc_photos/event/event.dart';
|
||||
import 'package:nc_photos/event/native_event.dart';
|
||||
import 'package:nc_photos/exception_event.dart';
|
||||
import 'package:nc_photos/exception_util.dart' as exception_util;
|
||||
import 'package:nc_photos/flutter_util.dart' as flutter_util;
|
||||
|
@ -40,7 +39,6 @@ import 'package:nc_photos/service.dart' as service;
|
|||
import 'package:nc_photos/snack_bar_manager.dart';
|
||||
import 'package:nc_photos/theme.dart';
|
||||
import 'package:nc_photos/theme/dimension.dart';
|
||||
import 'package:nc_photos/throttler.dart';
|
||||
import 'package:nc_photos/widget/collection_browser.dart';
|
||||
import 'package:nc_photos/widget/collection_picker.dart';
|
||||
import 'package:nc_photos/widget/file_sharer_dialog.dart';
|
||||
|
@ -59,7 +57,6 @@ import 'package:np_codegen/np_codegen.dart';
|
|||
import 'package:np_collection/np_collection.dart';
|
||||
import 'package:np_common/object_util.dart';
|
||||
import 'package:np_common/or_null.dart';
|
||||
import 'package:np_platform_util/np_platform_util.dart';
|
||||
import 'package:to_string/to_string.dart';
|
||||
import 'package:visibility_detector/visibility_detector.dart';
|
||||
|
||||
|
|
Loading…
Reference in a new issue