💄 Optimized attachment insert in article compose
This commit is contained in:
@ -106,7 +106,11 @@ class AttachmentPreview extends StatelessWidget {
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
Gap(6),
|
||||
Center(child: LinearProgressIndicator(value: progress)),
|
||||
Center(
|
||||
child: LinearProgressIndicator(
|
||||
value: progress != null ? progress! / 100.0 : null,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
@ -474,13 +474,14 @@ class ComposeLogic {
|
||||
state.attachments.value = clone;
|
||||
}
|
||||
|
||||
static void insertAttachment(ComposeState state, int index) {
|
||||
static void insertAttachment(WidgetRef ref, ComposeState state, int index) {
|
||||
final attachment = state.attachments.value[index];
|
||||
if (!attachment.isOnCloud) {
|
||||
return;
|
||||
}
|
||||
final cloudFile = attachment.data as SnCloudFile;
|
||||
final markdown = '';
|
||||
final baseUrl = ref.read(serverUrlProvider);
|
||||
final markdown = '';
|
||||
final controller = state.contentController;
|
||||
final text = controller.text;
|
||||
final selection = controller.selection;
|
||||
|
Reference in New Issue
Block a user