mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 17:23:16 +03:00
feat(mobile): Added "jump to date" functionality to the memory view (#7323)
* implemented jump to date from memory * Changed implementation to a ValueNotifier & fixes * remove debug code * feat(mobile): - Added index bound checks - Handled edge cases when scrolling to the very bottom of the grid-view - removing the listener on dispose * feat(mobile): fixed debug index offset & added debug toast for scroll errors * feat(mobile): added more debug toasts... * feat(mobile): scroll to month, if timeline is not grouped by days --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
final scrollToDateNotifierProvider = ScrollToDateNotifier(null);
|
||||
|
||||
class ScrollToDateNotifier extends ValueNotifier<DateTime?> {
|
||||
ScrollToDateNotifier(super.value);
|
||||
|
||||
void scrollToDate(DateTime date) {
|
||||
value = date;
|
||||
|
||||
// Manually notify listeners to trigger the scroll, even if the value hasn't changed
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user