File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -81,10 +81,15 @@ UInt16 SaturatingDecrement(UInt16 base) {
8181 return base == 0 ? base : base - 1 ;
8282}
8383
84- static TootContent * TootContentConstructor (UInt16 length ) {
84+ static TootContent * TootContentConstructor (UInt16 length , UInt16 * is_reply_to ) {
8585 int size = sizeof (TootContent ) + length + sizeof (char );
8686 TootContent * ret = (TootContent * ) MemPtrNew (size );
8787 MemSet (ret , size , 0 );
88+ if (is_reply_to != NULL ) {
89+ // adding +1 here to emulate an option type.
90+ // this is subtracted again in the conduit
91+ ret -> is_reply_to = * is_reply_to + 1 ;
92+ }
8893 ret -> content_len = length ;
8994 return ret ;
9095}
@@ -672,7 +677,8 @@ static Boolean ComposeTootFormHandleEvent(EventType* event) {
672677 MemHandle content_handle = FldGetTextHandle (content );
673678 FldSetTextHandle (content , NULL );
674679 char * content_str = (char * ) MemHandleLock (content_handle );
675- TootContent * to_write = TootContentConstructor (StrLen (content_str ));
680+ UInt16 * is_reply_to = sharedVarsP -> toot_is_reply_to_current ? & (sharedVarsP -> current_toot_author_record ) : NULL ;
681+ TootContent * to_write = TootContentConstructor (StrLen (content_str ), is_reply_to );
676682 #ifdef HEFFALUMP_TESTING
677683 ErrNonFatalDisplayIf (StrLen (content_str ) == 0 , "Composed toot has zero len" );
678684 #endif
You can’t perform that action at this time.
0 commit comments