File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
crates/notedeck_columns/src Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
- use crate :: ui:: note:: PostType ;
1
+ use poll_promise:: Promise ;
2
+
3
+ use crate :: { media_upload:: Nip94Event , ui:: note:: PostType , Error } ;
2
4
use std:: collections:: HashMap ;
3
5
4
6
#[ derive( Default ) ]
5
7
pub struct Draft {
6
8
pub buffer : String ,
9
+ pub uploaded_media : Vec < Nip94Event > , // media uploads to include
10
+ pub uploading_media : Vec < Promise < Result < Nip94Event , Error > > > , // promises that aren't ready yet
11
+ pub upload_errors : Vec < String > , // media upload errors to show the user
7
12
}
8
13
9
14
#[ derive( Default ) ]
@@ -42,5 +47,8 @@ impl Draft {
42
47
43
48
pub fn clear ( & mut self ) {
44
49
self . buffer = "" . to_string ( ) ;
50
+ self . upload_errors = Vec :: new ( ) ;
51
+ self . uploaded_media = Vec :: new ( ) ;
52
+ self . uploading_media = Vec :: new ( ) ;
45
53
}
46
54
}
You can’t perform that action at this time.
0 commit comments