@@ -63,6 +63,29 @@ fn render_details_and_actions(f: &mut Frame, app: &App, details_chunk: Rect, act
63
63
64
64
f. render_widget ( patchset_details, details_chunk) ;
65
65
66
+ let mut patches_to_reply = String :: new ( ) ;
67
+ if let Some ( true ) = patchset_details_and_actions
68
+ . patchset_actions
69
+ . get ( & PatchsetAction :: ReplyWithReviewedBy )
70
+ {
71
+ patches_to_reply. push ( '(' ) ;
72
+ let number_offset = if patchset_details_and_actions. has_cover_letter {
73
+ 0
74
+ } else {
75
+ 1
76
+ } ;
77
+ let patches_to_reply_numbers: Vec < usize > = patchset_details_and_actions
78
+ . patches_to_reply
79
+ . iter ( )
80
+ . enumerate ( )
81
+ . filter_map ( |( i, & val) | if val { Some ( i + number_offset) } else { None } )
82
+ . collect ( ) ;
83
+ for number in patches_to_reply_numbers {
84
+ patches_to_reply. push_str ( & format ! ( "{number}," ) ) ;
85
+ }
86
+ patches_to_reply = format ! ( "{})" , & patches_to_reply[ ..patches_to_reply. len( ) - 1 ] ) ;
87
+ }
88
+
66
89
let patchset_actions = & patchset_details_and_actions. patchset_actions ;
67
90
let patchset_actions = vec ! [
68
91
Line :: from( vec![
@@ -81,8 +104,9 @@ fn render_details_and_actions(f: &mut Frame, app: &App, details_chunk: Rect, act
81
104
Span :: styled( "ookmark" , Style :: default ( ) . fg( Color :: Cyan ) ) ,
82
105
] ) ,
83
106
Line :: from( vec![
84
- if * patchset_actions
85
- . get( & PatchsetAction :: ReplyWithReviewedBy )
107
+ if * patchset_details_and_actions
108
+ . patches_to_reply
109
+ . get( patchset_details_and_actions. preview_index)
86
110
. unwrap( )
87
111
{
88
112
Span :: styled( "[x] " , Style :: default ( ) . fg( Color :: Green ) )
@@ -96,7 +120,8 @@ fn render_details_and_actions(f: &mut Frame, app: &App, details_chunk: Rect, act
96
120
. add_modifier( Modifier :: UNDERLINED )
97
121
. add_modifier( Modifier :: BOLD ) ,
98
122
) ,
99
- Span :: styled( "eviewed-by" , Style :: default ( ) . fg( Color :: Cyan ) ) ,
123
+ Span :: styled( "eviewed-by " , Style :: default ( ) . fg( Color :: Cyan ) ) ,
124
+ Span :: styled( patches_to_reply, Style :: default ( ) . fg( Color :: DarkGray ) ) ,
100
125
] ) ,
101
126
] ;
102
127
let patchset_actions = Paragraph :: new ( patchset_actions)
@@ -122,10 +147,17 @@ fn render_preview(f: &mut Frame, app: &App, chunk: Rect) {
122
147
. message_id ( )
123
148
. href ;
124
149
let mut preview_title = String :: from ( " Preview " ) ;
125
- if let Some ( successful_indexes) = app. reviewed_patchsets . get ( representative_patch_message_id) {
126
- if successful_indexes. contains ( & preview_index) {
127
- preview_title = " Preview [REVIEWED] " . to_string ( ) ;
128
- }
150
+ if matches ! (
151
+ app. reviewed_patchsets. get( representative_patch_message_id) ,
152
+ Some ( successful_indexes) if successful_indexes. contains( & preview_index)
153
+ ) {
154
+ preview_title = " Preview [REVIEWED-BY] " . to_string ( ) ;
155
+ } else if * patchset_details_and_actions
156
+ . patches_to_reply
157
+ . get ( preview_index)
158
+ . unwrap ( )
159
+ {
160
+ preview_title = " Preview [REVIEWED-BY]* " . to_string ( ) ;
129
161
} ;
130
162
131
163
let preview_offset = patchset_details_and_actions. preview_scroll_offset ;
0 commit comments