Compare commits

...

2 Commits

Author SHA1 Message Date
9a8e40b288 🚀 Launch 2.5.2+92 2025-04-07 00:53:30 +08:00
cb0986efee 🐛 Bug fixes on live stream post 2025-04-07 00:49:43 +08:00
3 changed files with 10 additions and 15 deletions

View File

@@ -243,9 +243,13 @@ class PostWriteController extends ChangeNotifier {
contentController.text = post.body['content'] ?? ''; contentController.text = post.body['content'] ?? '';
aliasController.text = post.alias ?? ''; aliasController.text = post.alias ?? '';
rewardController.text = post.body['reward']?.toString() ?? ''; rewardController.text = post.body['reward']?.toString() ?? '';
videoAttachment = post.body['video'] != null if (post.body['video'] != null) {
? SnAttachment.fromJson(post.body['video']) if (post.body['video'] is String) {
: null; videoUrl = post.body['video'];
} else {
videoAttachment = SnAttachment.fromJson(post.body['video']);
}
}
publishedAt = post.publishedAt; publishedAt = post.publishedAt;
publishedUntil = post.publishedUntil; publishedUntil = post.publishedUntil;
visibleUsers = List.from(post.visibleUsersList ?? [], growable: true); visibleUsers = List.from(post.visibleUsersList ?? [], growable: true);
@@ -264,6 +268,7 @@ class PostWriteController extends ChangeNotifier {
); );
poll = post.poll; poll = post.poll;
videoLive = post.body['is_live'] ?? false;
editingDraft = post.isDraft; editingDraft = post.isDraft;
if (post.body['thumbnail'] != null) { if (post.body['thumbnail'] != null) {
@@ -604,6 +609,7 @@ class PostWriteController extends ChangeNotifier {
'video': videoUrl.isNotEmpty ? videoUrl : videoAttachment!.rid, 'video': videoUrl.isNotEmpty ? videoUrl : videoAttachment!.rid,
if (poll != null) 'poll': poll!.id, if (poll != null) 'poll': poll!.id,
if (realm != null) 'realm': realm!.id, if (realm != null) 'realm': realm!.id,
if (videoLive) 'is_live': videoLive,
'is_draft': saveAsDraft, 'is_draft': saveAsDraft,
}, },
onSendProgress: (count, total) { onSendProgress: (count, total) {

View File

@@ -1118,8 +1118,6 @@ class _PostVideoEditor extends StatefulWidget {
} }
class _PostVideoEditorState extends State<_PostVideoEditor> { class _PostVideoEditorState extends State<_PostVideoEditor> {
String? _renderer;
final TextEditingController _streamUrlController = TextEditingController(); final TextEditingController _streamUrlController = TextEditingController();
void _selectVideo() async { void _selectVideo() async {
@@ -1296,15 +1294,6 @@ class _PostVideoEditorState extends State<_PostVideoEditor> {
onChanged: (value) => onChanged: (value) =>
widget.controller.setVideoLive(value ?? false), widget.controller.setVideoLive(value ?? false),
), ),
CheckboxListTile(
secondary: const Icon(Symbols.web),
title: Text('postVideoRendererWeb').tr(),
subtitle: Text('postVideoRendererWebDescription').tr(),
value: _renderer == 'web',
onChanged: (value) => setState(
() => _renderer = (value ?? false) ? 'web' : null,
),
),
], ],
), ),
), ),

View File

@@ -16,7 +16,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 2.5.2+91 version: 2.5.2+92
environment: environment:
sdk: ^3.5.4 sdk: ^3.5.4