mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat: expanded sliver app bar (#19827)
* use mutex
* feat: cool app bar
* animation
* adapt to more pages
* animation
* better animation
* fix: asset count
* Revert "fix: asset count"
This reverts commit 673a5b264b.
* fix: asset count
* fix: shaky animation on Android
* tunning
* offset SizedBox to fix scroll jump on multiselect
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
977d6452f6
commit
feff1899ee
21 changed files with 733 additions and 75 deletions
|
|
@ -8,26 +8,26 @@ class RemoteAlbumService {
|
|||
|
||||
const RemoteAlbumService(this._repository);
|
||||
|
||||
Future<List<Album>> getAll() {
|
||||
Future<List<RemoteAlbum>> getAll() {
|
||||
return _repository.getAll();
|
||||
}
|
||||
|
||||
List<Album> sortAlbums(
|
||||
List<Album> albums,
|
||||
List<RemoteAlbum> sortAlbums(
|
||||
List<RemoteAlbum> albums,
|
||||
RemoteAlbumSortMode sortMode, {
|
||||
bool isReverse = false,
|
||||
}) {
|
||||
return sortMode.sortFn(albums, isReverse);
|
||||
}
|
||||
|
||||
List<Album> searchAlbums(
|
||||
List<Album> albums,
|
||||
List<RemoteAlbum> searchAlbums(
|
||||
List<RemoteAlbum> albums,
|
||||
String query,
|
||||
String? userId, [
|
||||
QuickFilterMode filterMode = QuickFilterMode.all,
|
||||
]) {
|
||||
final lowerQuery = query.toLowerCase();
|
||||
List<Album> filtered = albums;
|
||||
List<RemoteAlbum> filtered = albums;
|
||||
|
||||
// Apply text search filter
|
||||
if (query.isNotEmpty) {
|
||||
|
|
|
|||
|
|
@ -210,6 +210,9 @@ class TimelineService {
|
|||
Future<void> preCacheAssets(int index) =>
|
||||
_mutex.run(() => _loadAssets(index, math.min(5, _totalAssets - index)));
|
||||
|
||||
BaseAsset getRandomAsset() =>
|
||||
_buffer.elementAt(math.Random().nextInt(_buffer.length));
|
||||
|
||||
BaseAsset getAsset(int index) {
|
||||
if (!hasRange(index, 1)) {
|
||||
throw RangeError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue