mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Fixed display of corner button in section with ttl button in record bar.
This commit is contained in:
parent
d1f4463c2a
commit
8895e49466
7 changed files with 21 additions and 5 deletions
|
@ -6283,7 +6283,8 @@ std::optional<bool> HistoryWidget::cornerButtonsDownShown() {
|
|||
if (!_list || _firstLoadRequest) {
|
||||
return false;
|
||||
}
|
||||
if (_voiceRecordBar->isLockPresent()) {
|
||||
if (_voiceRecordBar->isLockPresent()
|
||||
|| _voiceRecordBar->isTTLButtonShown()) {
|
||||
return false;
|
||||
}
|
||||
if (!_history->loadedAtBottom() || _cornerButtons.replyReturn()) {
|
||||
|
|
|
@ -2925,6 +2925,10 @@ bool ComposeControls::isLockPresent() const {
|
|||
return _voiceRecordBar->isLockPresent();
|
||||
}
|
||||
|
||||
bool ComposeControls::isTTLButtonShown() const {
|
||||
return _voiceRecordBar->isTTLButtonShown();
|
||||
}
|
||||
|
||||
rpl::producer<bool> ComposeControls::lockShowStarts() const {
|
||||
return _voiceRecordBar->lockShowStarts();
|
||||
}
|
||||
|
|
|
@ -220,6 +220,7 @@ public:
|
|||
|
||||
[[nodiscard]] rpl::producer<bool> lockShowStarts() const;
|
||||
[[nodiscard]] bool isLockPresent() const;
|
||||
[[nodiscard]] bool isTTLButtonShown() const;
|
||||
[[nodiscard]] bool isRecording() const;
|
||||
[[nodiscard]] bool isRecordingPressed() const;
|
||||
[[nodiscard]] rpl::producer<bool> recordingActiveValue() const;
|
||||
|
|
|
@ -1838,6 +1838,10 @@ bool VoiceRecordBar::isRecordingByAnotherBar() const {
|
|||
return !isRecording() && ::Media::Capture::instance()->started();
|
||||
}
|
||||
|
||||
bool VoiceRecordBar::isTTLButtonShown() const {
|
||||
return !_ttlButton->isHidden();
|
||||
}
|
||||
|
||||
bool VoiceRecordBar::hasDuration() const {
|
||||
return _recordingSamples > 0;
|
||||
}
|
||||
|
|
|
@ -98,6 +98,7 @@ public:
|
|||
[[nodiscard]] bool isListenState() const;
|
||||
[[nodiscard]] bool isActive() const;
|
||||
[[nodiscard]] bool isRecordingByAnotherBar() const;
|
||||
[[nodiscard]] bool isTTLButtonShown() const;
|
||||
|
||||
private:
|
||||
enum class StopType {
|
||||
|
|
|
@ -1838,7 +1838,8 @@ bool RepliesWidget::cornerButtonsIgnoreVisibility() {
|
|||
}
|
||||
|
||||
std::optional<bool> RepliesWidget::cornerButtonsDownShown() {
|
||||
if (_composeControls->isLockPresent()) {
|
||||
if (_composeControls->isLockPresent()
|
||||
|| _composeControls->isTTLButtonShown()) {
|
||||
return false;
|
||||
}
|
||||
const auto top = _scroll->scrollTop() + st::historyToDownShownAfter;
|
||||
|
@ -1851,7 +1852,9 @@ std::optional<bool> RepliesWidget::cornerButtonsDownShown() {
|
|||
}
|
||||
|
||||
bool RepliesWidget::cornerButtonsUnreadMayBeShown() {
|
||||
return _loaded && !_composeControls->isLockPresent();
|
||||
return _loaded
|
||||
&& !_composeControls->isLockPresent()
|
||||
&& !_composeControls->isTTLButtonShown();
|
||||
}
|
||||
|
||||
bool RepliesWidget::cornerButtonsHas(CornerButtonType type) {
|
||||
|
|
|
@ -843,7 +843,8 @@ bool ScheduledWidget::cornerButtonsIgnoreVisibility() {
|
|||
}
|
||||
|
||||
std::optional<bool> ScheduledWidget::cornerButtonsDownShown() {
|
||||
if (_composeControls->isLockPresent()) {
|
||||
if (_composeControls->isLockPresent()
|
||||
|| _composeControls->isTTLButtonShown()) {
|
||||
return false;
|
||||
}
|
||||
const auto top = _scroll->scrollTop() + st::historyToDownShownAfter;
|
||||
|
@ -857,7 +858,8 @@ std::optional<bool> ScheduledWidget::cornerButtonsDownShown() {
|
|||
|
||||
bool ScheduledWidget::cornerButtonsUnreadMayBeShown() {
|
||||
return _inner->loadedAtBottomKnown()
|
||||
&& !_composeControls->isLockPresent();
|
||||
&& !_composeControls->isLockPresent()
|
||||
&& !_composeControls->isTTLButtonShown();
|
||||
}
|
||||
|
||||
bool ScheduledWidget::cornerButtonsHas(CornerButtonType type) {
|
||||
|
|
Loading…
Add table
Reference in a new issue