mirror of
https://github.com/nostrlabs-io/zap-stream-flutter.git
synced 2025-06-15 11:48:21 +00:00
fix: update default & current stream info
This commit is contained in:
@ -171,8 +171,20 @@ class _StreamConfigWidget extends State<StreamConfigWidget> {
|
|||||||
BasicButton.text(
|
BasicButton.text(
|
||||||
t.button.save,
|
t.button.save,
|
||||||
onTap: (context) async {
|
onTap: (context) async {
|
||||||
|
final current = widget.currentStream?.getFirstTag("d");
|
||||||
|
|
||||||
|
// Update current first
|
||||||
|
if (current != null) {
|
||||||
|
await widget.api.updateDefaultStreamInfo(
|
||||||
|
id: current,
|
||||||
|
title: _title.text,
|
||||||
|
summary: _summary.text,
|
||||||
|
contentWarning: _nsfw ? "nsfw" : null,
|
||||||
|
tags: _tags.text.split(","),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// Updated default stream info (no id)
|
||||||
await widget.api.updateDefaultStreamInfo(
|
await widget.api.updateDefaultStreamInfo(
|
||||||
id: widget.currentStream?.getFirstTag("d"),
|
|
||||||
title: _title.text,
|
title: _title.text,
|
||||||
summary: _summary.text,
|
summary: _summary.text,
|
||||||
contentWarning: _nsfw ? "nsfw" : null,
|
contentWarning: _nsfw ? "nsfw" : null,
|
||||||
|
Reference in New Issue
Block a user