@@ -4320,45 +4320,47 @@ def __init__(
43204320 sender ,
43214321 )
43224322 self .group_directions .add_dummy ()
4323-
4324- self .group_more = ContainerFlexCol (
4325- self .container , None , padding_row = 0 , no_align = True
4326- )
4327- self .item_group_header = CardHeader (
4328- self .group_more , _ (i18n_keys .FORM__MORE ), "A:/res/group-icon-more.png"
4329- )
4330- if resource is not None :
4331- self .item_body_resource = DisplayItem (
4332- self .group_more , _ (i18n_keys .LIST_KEY__RESOURCE_COLON ), resource
4323+ if any ((resource , balance , receiver , duration , lock )):
4324+ self .group_more = ContainerFlexCol (
4325+ self .container , None , padding_row = 0 , no_align = True
4326+ )
4327+ self .item_group_header = CardHeader (
4328+ self .group_more , _ (i18n_keys .FORM__MORE ), "A:/res/group-icon-more.png"
43334329 )
4334- if balance :
4335- if is_freeze :
4336- self .item_body_freeze_balance = DisplayItem (
4330+ if resource is not None :
4331+ self .item_body_resource = DisplayItem (
4332+ self .group_more , _ (i18n_keys .LIST_KEY__RESOURCE_COLON ), resource
4333+ )
4334+ if balance :
4335+ if is_freeze :
4336+ self .item_body_freeze_balance = DisplayItem (
4337+ self .group_more ,
4338+ _ (i18n_keys .LIST_KEY__FROZEN_BALANCE_COLON ),
4339+ balance ,
4340+ )
4341+ else :
4342+ self .item_body_balance = DisplayItem (
4343+ self .group_more ,
4344+ _ (i18n_keys .LIST_KEY__AMOUNT__COLON ),
4345+ balance ,
4346+ )
4347+ if duration :
4348+ self .item_body_duration = DisplayItem (
43374349 self .group_more ,
4338- _ (i18n_keys .LIST_KEY__FROZEN_BALANCE_COLON ),
4339- balance ,
4350+ _ (i18n_keys .LIST_KEY__FROZEN_DURATION_COLON ),
4351+ duration ,
43404352 )
4341- else :
4342- self .item_body_balance = DisplayItem (
4353+ if receiver is not None :
4354+ self .item_body_receiver = DisplayItem (
43434355 self .group_more ,
4344- _ (i18n_keys .LIST_KEY__AMOUNT__COLON ),
4345- balance ,
4356+ _ (i18n_keys .LIST_KEY__RECEIVER_ADDRESS_COLON ),
4357+ receiver ,
43464358 )
4347- if duration :
4348- self .item_body_duration = DisplayItem (
4349- self .group_more ,
4350- _ (i18n_keys .LIST_KEY__FROZEN_DURATION_COLON ),
4351- duration ,
4352- )
4353- if receiver is not None :
4354- self .item_body_receiver = DisplayItem (
4355- self .group_more , _ (i18n_keys .LIST_KEY__RECEIVER_ADDRESS_COLON ), receiver
4356- )
4357- if lock is not None :
4358- self .item_body_lock = DisplayItem (
4359- self .group_more , _ (i18n_keys .LIST_KEY__LOCK_COLON ), lock
4360- )
4361- self .group_more .add_dummy ()
4359+ if lock is not None :
4360+ self .item_body_lock = DisplayItem (
4361+ self .group_more , _ (i18n_keys .LIST_KEY__LOCK_COLON ), lock
4362+ )
4363+ self .group_more .add_dummy ()
43624364
43634365
43644366class TronVoteWitness (FullSizeWindow ):
0 commit comments