🐛 Bug fixes on realm missing post editor
This commit is contained in:
@ -91,8 +91,8 @@ class _ExplorePostWidgetState extends State<ExplorePostWidget> {
|
||||
child: const Icon(Icons.edit),
|
||||
onPressed: () async {
|
||||
final did = await SolianRouter.router.pushNamed(
|
||||
'posts.moments.editor',
|
||||
queryParameters: {'realm': widget.realm},
|
||||
widget.realm == null ? 'posts.moments.editor' : 'realms.posts.moments.editor',
|
||||
pathParameters: widget.realm == null ? {} : {'realm': widget.realm!},
|
||||
);
|
||||
if (did == true) _pagingController.refresh();
|
||||
},
|
||||
|
@ -16,8 +16,9 @@ import 'package:solian/widgets/posts/attachment_editor.dart';
|
||||
|
||||
class MomentEditorScreen extends StatefulWidget {
|
||||
final Post? editing;
|
||||
final String? realm;
|
||||
|
||||
const MomentEditorScreen({super.key, this.editing});
|
||||
const MomentEditorScreen({super.key, this.editing, this.realm});
|
||||
|
||||
@override
|
||||
State<MomentEditorScreen> createState() => _MomentEditorScreenState();
|
||||
@ -61,6 +62,7 @@ class _MomentEditorScreenState extends State<MomentEditorScreen> {
|
||||
'alias': _alias,
|
||||
'content': _textController.value.text,
|
||||
'attachments': _attachments,
|
||||
'realm': widget.realm,
|
||||
});
|
||||
|
||||
var res = await Response.fromStream(await auth.client!.send(req));
|
||||
|
Reference in New Issue
Block a user