Get rid of useless param

This commit is contained in:
Ming Ming 2021-04-11 17:52:39 +08:00
parent d7269a1cba
commit dd7cad7d30

View file

@ -77,7 +77,7 @@ class _HomePhotosState extends State<HomePhotos> {
_bloc = bloc; _bloc = bloc;
if (_bloc.state is ScanDirBlocInit) { if (_bloc.state is ScanDirBlocInit) {
_log.info("[_initBloc] Initialize bloc"); _log.info("[_initBloc] Initialize bloc");
_reqQuery(widget.account.roots); _reqQuery();
} else { } else {
// process the current state // process the current state
_onStateChange(context, _bloc.state); _onStateChange(context, _bloc.state);
@ -240,7 +240,7 @@ class _HomePhotosState extends State<HomePhotos> {
duration: k.snackBarDurationNormal, duration: k.snackBarDurationNormal,
)); ));
} else if (state is ScanDirBlocInconsistent) { } else if (state is ScanDirBlocInconsistent) {
_reqQuery(widget.account.roots); _reqQuery();
} }
} }
@ -454,10 +454,10 @@ class _HomePhotosState extends State<HomePhotos> {
return fileIndex; return fileIndex;
} }
void _reqQuery(List<String> roots) { void _reqQuery() {
_bloc.add(ScanDirBlocQuery( _bloc.add(ScanDirBlocQuery(
widget.account, widget.account,
roots widget.account.roots
.map((e) => File( .map((e) => File(
path: path:
"${api_util.getWebdavRootUrlRelative(widget.account)}/$e")) "${api_util.getWebdavRootUrlRelative(widget.account)}/$e"))