Move message prop
This commit is contained in:
parent
6cc0f70ec1
commit
4b4e743413
|
@ -6,14 +6,16 @@ import '../pages/settings.dart';
|
||||||
import '../util/goto.dart';
|
import '../util/goto.dart';
|
||||||
import 'stores.dart';
|
import 'stores.dart';
|
||||||
|
|
||||||
Function(Function(Jwt token) action) useLoggedInAction(
|
Function(
|
||||||
String instanceUrl, [
|
Function(Jwt token) action, [
|
||||||
String message,
|
String message,
|
||||||
]) {
|
]) useLoggedInAction(
|
||||||
|
String instanceUrl,
|
||||||
|
) {
|
||||||
final context = useContext();
|
final context = useContext();
|
||||||
final store = useAccountsStore();
|
final store = useAccountsStore();
|
||||||
|
|
||||||
return (Function(Jwt token) action) {
|
return (Function(Jwt token) action, [message]) {
|
||||||
if (store.isAnonymousFor(instanceUrl)) {
|
if (store.isAnonymousFor(instanceUrl)) {
|
||||||
return () {
|
return () {
|
||||||
Scaffold.of(context).showSnackBar(SnackBar(
|
Scaffold.of(context).showSnackBar(SnackBar(
|
||||||
|
|
Loading…
Reference in New Issue