Various improvements

This commit is contained in:
Ilya Laktyushin 2025-01-22 15:15:26 +04:00
parent bf8c4f1ecd
commit 8fd19d35bb
3 changed files with 21 additions and 10 deletions

View File

@ -13727,6 +13727,9 @@ Sorry for the inconvenience.";
"Gift.View.HiddenInfo.Channel" = "This item is hidden from visitors of your channel.";
"Gift.View.HiddenInfoShow.Channel" = "This item is hidden from visitors of your channel. [Show >]()";
"Gift.View.UniqueHiddenInfo" = "This gift is not displayed on your page.";
"Gift.View.UniqueHiddenInfo.Channel" = "This item is not displayed in your channel's Gifts.";
"Gift.View.KeepOrConvertDescription.Channel" = "Your channel can keep this gift in your Profile or convert it to %@. [More About Stars >]()";
"Gift.View.KeepUpgradeOrConvertDescription.Channel" = "Your channel can keep this gift, upgrade it, or sell it for %@. [More About Stars >]()";

View File

@ -282,11 +282,6 @@
[_wrapperView addSubview:_selectedPhotosView];
}
_photoCounterButton = [[TGMediaPickerPhotoCounterButton alloc] initWithFrame:CGRectMake(0, 0, 64, 38)];
[_photoCounterButton addTarget:self action:@selector(photoCounterButtonPressed) forControlEvents:UIControlEventTouchUpInside];
_photoCounterButton.userInteractionEnabled = false;
[_wrapperView addSubview:_photoCounterButton];
_selectionChangedDisposable = [[_selectionContext selectionChangedSignal] startStrictWithNext:^(id next)
{
__strong TGMediaPickerGalleryInterfaceView *strongSelf = weakSelf;
@ -429,6 +424,11 @@
_headerWrapperView = [[UIView alloc] init];
[_wrapperView addSubview:_headerWrapperView];
_photoCounterButton = [[TGMediaPickerPhotoCounterButton alloc] initWithFrame:CGRectMake(0, 0, 64, 38)];
[_photoCounterButton addTarget:self action:@selector(photoCounterButtonPressed) forControlEvents:UIControlEventTouchUpInside];
_photoCounterButton.userInteractionEnabled = false;
[_wrapperView addSubview:_photoCounterButton];
TGPhotoEditorDoneButton doneButton = isScheduledMessages ? TGPhotoEditorDoneButtonSchedule : TGPhotoEditorDoneButtonSend;
_portraitToolbarView = [[TGPhotoToolbarView alloc] initWithContext:_context backButton:TGPhotoEditorBackButtonBack doneButton:doneButton solidBackground:false];
@ -1631,7 +1631,11 @@
{
UIView *view = [super hitTest:point withEvent:event];
if (_coverTitleLabel.hidden) {
bool editingCover = false;
if (_coverTitleLabel != nil && !_coverTitleLabel.isHidden) {
editingCover = true;
}
if (!editingCover) {
if (view == _photoCounterButton
|| view == _checkButton
|| view == _muteButton
@ -2007,9 +2011,9 @@
{
[UIView performWithoutAnimation:^
{
_photoCounterButton.frame = CGRectMake(screenEdges.right - 56 - _safeAreaInset.right, screenEdges.bottom - TGPhotoEditorToolbarSize - [_captionMixin.inputPanel baseHeight] - 22 - _safeAreaInset.bottom - (hasHeaderView ? 64.0 : 0.0), 64, 38);
_photoCounterButton.frame = CGRectMake(screenEdges.right - 56 - _safeAreaInset.right, screenEdges.bottom - TGPhotoEditorToolbarSize - [_captionMixin.inputPanel baseHeight] - 40 - _safeAreaInset.bottom - (hasHeaderView ? 46.0 : 0.0), 64, 38);
_selectedPhotosView.frame = CGRectMake(screenEdges.left + 4, screenEdges.bottom - TGPhotoEditorToolbarSize - [_captionMixin.inputPanel baseHeight] - photosViewSize - 36 - _safeAreaInset.bottom - (hasHeaderView ? 64.0 : 0.0), self.frame.size.width - 4 * 2 - _safeAreaInset.right, photosViewSize);
_selectedPhotosView.frame = CGRectMake(screenEdges.left + 4, screenEdges.bottom - TGPhotoEditorToolbarSize - [_captionMixin.inputPanel baseHeight] - photosViewSize - 54 - _safeAreaInset.bottom - (hasHeaderView ? 46.0 : 0.0), self.frame.size.width - 4 * 2 - _safeAreaInset.right, photosViewSize);
}];
_landscapeToolbarView.frame = CGRectMake(_landscapeToolbarView.frame.origin.x, screenEdges.top, TGPhotoEditorToolbarSize, self.frame.size.height);

View File

@ -1843,7 +1843,11 @@ private final class GiftViewSheetContent: CombinedComponent {
} else if let upgradeStars, upgradeStars > 0 && !upgraded {
descriptionText = isChannelGift ? strings.Gift_View_HiddenInfoShow_Channel : strings.Gift_View_HiddenInfoShow
} else {
descriptionText = isChannelGift ? strings.Gift_View_HiddenInfo_Channel : strings.Gift_View_HiddenInfo
if let _ = uniqueGift {
descriptionText = isChannelGift ? strings.Gift_View_UniqueHiddenInfo_Channel : strings.Gift_View_UniqueHiddenInfo
} else {
descriptionText = isChannelGift ? strings.Gift_View_HiddenInfo_Channel : strings.Gift_View_HiddenInfo
}
}
let textFont = Font.regular(13.0)