File tree 1 file changed +14
-1
lines changed 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,20 @@ - (NSAttributedString *)attributeTail{
229
229
230
230
+ (CGFloat )cellHeightWithObj : (id )obj {
231
231
MRPR *mrpr = (MRPR *)obj;
232
- return kBaseCellHeight +[PRMRSearchCell contentLabelHeightWithPRMR: mrpr];
232
+ NSString *fromStr, *toStr;
233
+ if (mrpr.isMR ) {
234
+ fromStr = [NSString stringWithFormat: @" %@ " , mrpr.source_branch];
235
+ toStr = [NSString stringWithFormat: @" %@ " , mrpr.target_branch];
236
+ }else {
237
+ fromStr = [NSString stringWithFormat: @" %@ : %@ " , mrpr.author.name, mrpr.source_branch];
238
+ toStr = [NSString stringWithFormat: @" %@ : %@ " , mrpr.des_owner_name, mrpr.target_branch];
239
+ }
240
+
241
+ NSString *totalStr = [NSString stringWithFormat: @" %@%@ " , fromStr, toStr];
242
+
243
+ float offset= ([totalStr getWidthWithFont: [UIFont systemFontOfSize: 12 ] constrainedToSize: CGSizeMake (CGFLOAT_MAX, 20 )] + 40 > kScreen_Width - 2 *kPaddingLeftWidth )?(15 +20 ):0 ;
244
+
245
+ return kBaseCellHeight +[PRMRSearchCell contentLabelHeightWithPRMR: mrpr]+offset;
233
246
}
234
247
235
248
+ (CGFloat )contentLabelHeightWithPRMR : (MRPR *)curMRPR {
You can’t perform that action at this time.
0 commit comments