mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-24 05:07:45 +00:00
Merge branch 'main' into fix/increase-protobuf-limit
This commit is contained in:
commit
181c3b5ccc
2 changed files with 19 additions and 9 deletions
|
|
@ -118,7 +118,7 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|||
routerDelegate: router.routerDelegate,
|
||||
routeInformationProvider: router.routeInformationProvider,
|
||||
title: 'MangaYomi',
|
||||
scrollBehavior: AllowDesktopScrollBehavior(),
|
||||
scrollBehavior: AllowScrollBehavior(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -233,10 +233,21 @@ class _MyAppState extends ConsumerState<MyApp> {
|
|||
}
|
||||
}
|
||||
|
||||
class AllowDesktopScrollBehavior extends MaterialScrollBehavior {
|
||||
class AllowScrollBehavior extends MaterialScrollBehavior {
|
||||
// This allows the scrollable widgets to be scrolled with touch, mouse, stylus,
|
||||
// inverted stylus, trackpad, and unknown pointer devices.
|
||||
// This is useful for accessibility purposes, such as when using VoiceAccess,
|
||||
// which sends pointer events with unknown type when scrolling scrollables.
|
||||
// This is also useful for desktop platforms, where touch, stylus, and trackpad
|
||||
// interactions are common, and we want to ensure a consistent scrolling experience
|
||||
// across all devices.
|
||||
@override
|
||||
Set<PointerDeviceKind> get dragDevices => {
|
||||
PointerDeviceKind.touch,
|
||||
PointerDeviceKind.mouse,
|
||||
PointerDeviceKind.stylus,
|
||||
PointerDeviceKind.invertedStylus,
|
||||
PointerDeviceKind.trackpad,
|
||||
PointerDeviceKind.unknown,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,8 @@ void doRestore(Ref ref, {required String path, required BuildContext context}) {
|
|||
}
|
||||
} catch (e, s) {
|
||||
botToast('$e\n$s');
|
||||
} finally {
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -380,13 +382,10 @@ void restoreKotatsuBackup(Ref ref, Archive archive) {
|
|||
|
||||
@riverpod
|
||||
void restoreTachiBkBackup(Ref ref, String path, BackupType bkType) {
|
||||
final content = GZipDecoder().decodeBytes(
|
||||
InputFileStream(path).toUint8List(),
|
||||
);
|
||||
final backup = BackupMihon.create();
|
||||
backup.mergeFromCodedBufferReader(
|
||||
CodedBufferReader(content, sizeLimit: 250 << 20),
|
||||
);
|
||||
final inputStream = InputFileStream(path);
|
||||
final content = GZipDecoder().decodeBytes(inputStream.toUint8List());
|
||||
inputStream.close();
|
||||
final backup = BackupMihon.fromBuffer(content);
|
||||
List<Category> cats = [];
|
||||
isar.writeTxnSync(() {
|
||||
isar.categorys.clearSync();
|
||||
|
|
|
|||
Loading…
Reference in a new issue