File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1869,6 +1869,20 @@ abstract class ComposeBoxState extends State<ComposeBox> {
1869
1869
1870
1870
/// Switch the compose box back to regular non-edit mode, with no content.
1871
1871
void endEditInteraction ();
1872
+
1873
+ /// Uploads the provided files, populating the compose box with their links.
1874
+ ///
1875
+ /// If any of the file is larger than maximum file size allowed by the
1876
+ /// server, an error dialog is shown mentioning their names and actual
1877
+ /// file sizes.
1878
+ ///
1879
+ /// While uploading, a placeholder link is inserted in the compose box and
1880
+ /// it is replaced with an actual link after uploading completes
1881
+ /// successfully.
1882
+ ///
1883
+ /// If there is an error while uploading a file, then an error dialog is
1884
+ /// shown mentioning the corresponding file name.
1885
+ Future <void > uploadFiles (Iterable <FileToUpload > files);
1872
1886
}
1873
1887
1874
1888
class _ComposeBoxState extends State <ComposeBox > with PerAccountStoreAwareStateMixin <ComposeBox > implements ComposeBoxState {
@@ -2021,6 +2035,15 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
2021
2035
});
2022
2036
}
2023
2037
2038
+ @override
2039
+ Future <void > uploadFiles (Iterable <FileToUpload > files) async {
2040
+ await _uploadFiles (
2041
+ context: context,
2042
+ contentController: controller.content,
2043
+ contentFocusNode: controller.contentFocusNode,
2044
+ files: files);
2045
+ }
2046
+
2024
2047
@override
2025
2048
void onNewStore () {
2026
2049
final newStore = PerAccountStoreWidget .of (context);
You can’t perform that action at this time.
0 commit comments