@@ -409,26 +409,26 @@ private final class GiftUpgradePreviewScreenComponent: Component {
409409 var isSelected = false
410410 for attribute in attributeList {
411411 switch attribute {
412- case let . model( name, _ , rarityValue) :
413- itemId += name
412+ case let . model( name, file , rarityValue) :
413+ itemId += " \( file . fileId . id ) "
414414 if self . selectedSection == . models {
415415 title = name
416416 rarity = rarityValue
417417 modelAttribute = attribute
418418
419419 isSelected = self . selectedModel == attribute
420420 }
421- case let . backdrop( name, _ , _, _, _, _, rarityValue) :
422- itemId += name
421+ case let . backdrop( name, id , _, _, _, _, rarityValue) :
422+ itemId += " \( id ) "
423423 if self . selectedSection == . backdrops {
424424 title = name
425425 rarity = rarityValue
426426 backdropAttribute = attribute
427427
428428 isSelected = self . selectedBackdrop == attribute
429429 }
430- case let . pattern( name, _ , rarityValue) :
431- itemId += name
430+ case let . pattern( name, file , rarityValue) :
431+ itemId += " \( file . fileId . id ) "
432432 if self . selectedSection == . symbols {
433433 title = name
434434 rarity = rarityValue
@@ -732,15 +732,23 @@ private final class GiftUpgradePreviewScreenComponent: Component {
732732 transition. setFrame ( view: titleView, frame: titleFrame)
733733 }
734734
735+ var subtitleItems : [ AnimatedTextComponent . Item ] = [ ]
736+ let subtitleString = self . isPlaying ? environment. strings. Gift_Variants_RandomTraits : environment. strings. Gift_Variants_SelectedTraits
737+ let words = subtitleString. components ( separatedBy: " " )
738+ for i in 0 ..< words. count {
739+ var text = words [ i]
740+ if i > 0 {
741+ text = " \( text) "
742+ }
743+ subtitleItems. append ( AnimatedTextComponent . Item ( id: text. lowercased ( ) , content: . text( text) ) )
744+ }
745+
735746 let subtitleSize = self . subtitle. update (
736747 transition: . spring( duration: 0.2 ) ,
737748 component: AnyComponent ( AnimatedTextComponent (
738749 font: Font . regular ( 14.0 ) ,
739750 color: secondaryTextColor,
740- items: [
741- AnimatedTextComponent . Item ( id: self . isPlaying ? " random " : " selected " , content: . text( self . isPlaying ? " Random " : " Selected " ) ) ,
742- AnimatedTextComponent . Item ( id: " traits " , content: . text( " Traits " ) )
743- ] ,
751+ items: subtitleItems,
744752 noDelay: true ,
745753 blur: true
746754 ) ) ,
0 commit comments