Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 50 additions & 48 deletions lib/src/widgets/content_item/content_reply.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,56 +78,58 @@ class _ContentReplyState extends State<ContentReply> {
),
),
const SizedBox(height: 10),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
if (context.read<AppController>().serverSoftware ==
ServerSoftware.mbin)
ImageSelector(
_imageFile,
(file, altText) => setState(() {
_imageFile = file;
_altText = altText;
}),
inline: true,
),
IconButton(
onPressed: () async {
final newLang = await languageSelectionMenu(
context,
).askSelection(context, _replyLanguage);
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
spacing: 8,
children: [
if (context.read<AppController>().serverSoftware ==
ServerSoftware.mbin)
ImageSelector(
_imageFile,
(file, altText) => setState(() {
_imageFile = file;
_altText = altText;
}),
inline: true,
),
IconButton(
onPressed: () async {
final newLang = await languageSelectionMenu(
context,
).askSelection(context, _replyLanguage);

if (newLang != null) {
setState(() {
_replyLanguage = newLang;
});
}
},
icon: const Icon(Symbols.globe_rounded),
tooltip: getLanguageName(context, _replyLanguage),
),
const SizedBox(width: 8),
OutlinedButton(
onPressed: widget.onComplete,
child: Text(l(context).cancel),
),
const SizedBox(width: 8),
LoadingFilledButton(
onPressed: () async {
await widget.onReply(
_textController.text,
_replyLanguage,
image: _imageFile,
alt: _altText,
);
if (newLang != null) {
setState(() {
_replyLanguage = newLang;
});
}
},
icon: const Icon(Symbols.globe_rounded),
tooltip: getLanguageName(context, _replyLanguage),
),
OutlinedButton(
onPressed: widget.onComplete,
child: Text(l(context).cancel),
),
LoadingFilledButton(
onPressed: () async {
await widget.onReply(
_textController.text,
_replyLanguage,
image: _imageFile,
alt: _altText,
);

await replyDraftController.discard();
widget.onComplete();
},
label: Text(l(context).submit),
uesHaptics: true,
),
],
await replyDraftController.discard();
widget.onComplete();
},
label: Text(l(context).submit),
uesHaptics: true,
),
],
),
),
],
),
Expand Down
2 changes: 2 additions & 0 deletions lib/src/widgets/markdown/markdown_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ class _MarkdownEditorState extends State<MarkdownEditor> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
TabBar(
isScrollable: true,
tabAlignment: TabAlignment.center,
tabs: [
Tab(
child: Row(
Expand Down
Loading