@@ -1543,17 +1543,8 @@ private final class GiftViewSheetContent: CombinedComponent {
15431543
15441544 self ? . shareGift ( )
15451545 } ) ) )
1546-
1547- var canCraft = false
1548- if let data = self . context. currentAppConfiguration. with ( { $0 } ) . data {
1549- if let _ = data [ " ios_enable_crafting " ] {
1550- canCraft = true
1551- } else if let isDev = data [ " dev " ] as? Double , isDev == 1.0 {
1552- canCraft = true
1553- }
1554- }
1555-
1556- if let _ = arguments. canCraftDate, canCraft {
1546+
1547+ if let _ = arguments. canCraftDate {
15571548 items. append ( . action( ContextMenuActionItem ( text: presentationData. strings. Gift_View_Context_Craft, icon: { theme in
15581549 return generateTintedImage ( image: UIImage ( bundleImageName: " Premium/Craft/Craft " ) , color: theme. contextMenu. primaryColor)
15591550 } , action: { [ weak self] c, _ in
@@ -5279,27 +5270,16 @@ private final class GiftViewSheetContent: CombinedComponent {
52795270 var rightControlItems : [ GlassControlGroupComponent . Item ] = [ ]
52805271 if uniqueGift != nil && !showWearPreview && !isDismantled {
52815272 if let _ = component. subject. arguments? . canCraftDate {
5282- var canCraft = false
5283- if let data = component. context. currentAppConfiguration. with ( { $0 } ) . data {
5284- if let _ = data [ " ios_enable_crafting " ] {
5285- canCraft = true
5286- } else if let isDev = data [ " dev " ] as? Double , isDev == 1.0 {
5287- canCraft = true
5288- }
5289- }
5290-
5291- if canCraft {
5292- rightControlItems. append ( GlassControlGroupComponent . Item (
5293- id: AnyHashable ( " craft " ) ,
5294- content: . icon( " Premium/Craft " ) ,
5295- action: { [ weak state] in
5296- guard let state else {
5297- return
5298- }
5299- state. craftGift ( )
5273+ rightControlItems. append ( GlassControlGroupComponent . Item (
5274+ id: AnyHashable ( " craft " ) ,
5275+ content: . icon( " Premium/Craft " ) ,
5276+ action: { [ weak state] in
5277+ guard let state else {
5278+ return
53005279 }
5301- ) )
5302- }
5280+ state. craftGift ( )
5281+ }
5282+ ) )
53035283 }
53045284
53055285 rightControlItems. append ( GlassControlGroupComponent . Item (
0 commit comments