Move message prop

This commit is contained in:
krawieck 2020-09-18 17:30:32 +02:00
parent 6cc0f70ec1
commit 4b4e743413
1 changed files with 6 additions and 4 deletions

View File

@ -6,14 +6,16 @@ import '../pages/settings.dart';
import '../util/goto.dart';
import 'stores.dart';
Function(Function(Jwt token) action) useLoggedInAction(
String instanceUrl, [
Function(
Function(Jwt token) action, [
String message,
]) {
]) useLoggedInAction(
String instanceUrl,
) {
final context = useContext();
final store = useAccountsStore();
return (Function(Jwt token) action) {
return (Function(Jwt token) action, [message]) {
if (store.isAnonymousFor(instanceUrl)) {
return () {
Scaffold.of(context).showSnackBar(SnackBar(