mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-03-22 23:19:21 +01:00
Refactor rename fn
This commit is contained in:
parent
adf1968a40
commit
c63b473034
3 changed files with 4 additions and 4 deletions
|
@ -5,8 +5,8 @@ import 'package:nc_photos/entity/album/provider.dart';
|
||||||
import 'package:nc_photos/widget/album_browser.dart';
|
import 'package:nc_photos/widget/album_browser.dart';
|
||||||
import 'package:nc_photos/widget/dynamic_album_browser.dart';
|
import 'package:nc_photos/widget/dynamic_album_browser.dart';
|
||||||
|
|
||||||
/// Open the corresponding browser for this album
|
/// Push the corresponding browser route for this album
|
||||||
Future<void> open(BuildContext context, Account account, Album album) {
|
Future<void> push(BuildContext context, Account account, Album album) {
|
||||||
if (album.provider is AlbumStaticProvider) {
|
if (album.provider is AlbumStaticProvider) {
|
||||||
return Navigator.of(context).pushNamed(AlbumBrowser.routeName,
|
return Navigator.of(context).pushNamed(AlbumBrowser.routeName,
|
||||||
arguments: AlbumBrowserArguments(account, album));
|
arguments: AlbumBrowserArguments(account, album));
|
||||||
|
|
|
@ -479,7 +479,7 @@ class _HomeAlbumsState extends State<HomeAlbums>
|
||||||
}
|
}
|
||||||
|
|
||||||
void _openAlbum(BuildContext context, Album album) {
|
void _openAlbum(BuildContext context, Album album) {
|
||||||
album_browser_util.open(context, widget.account, album);
|
album_browser_util.push(context, widget.account, album);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _reqQuery() {
|
void _reqQuery() {
|
||||||
|
|
|
@ -291,7 +291,7 @@ class _SharingBrowserState extends State<SharingBrowser> {
|
||||||
|
|
||||||
Future<void> _onAlbumShareItemTap(
|
Future<void> _onAlbumShareItemTap(
|
||||||
BuildContext context, ListSharingAlbum share) {
|
BuildContext context, ListSharingAlbum share) {
|
||||||
return album_browser_util.open(context, widget.account, share.album);
|
return album_browser_util.push(context, widget.account, share.album);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _transformItems(List<ListSharingItem> items) {
|
void _transformItems(List<ListSharingItem> items) {
|
||||||
|
|
Loading…
Reference in a new issue