Skip to content

Commit 4d91ab7

Browse files
committed
Update lottie icons in voice chats.
1 parent dc2192d commit 4d91ab7

13 files changed

+125
-164
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
# Ensure diffs have LF endings
55
*.diff text eol=lf
66
*.bat text eol=crlf
7+
8+
# Ensure lottie animations are treated as binary files
9+
*.lottie binary

Telegram/Resources/icons/calls/active_hand.json

-1
This file was deleted.

Telegram/Resources/icons/calls/hand_muted_active.json

-1
This file was deleted.

Telegram/Resources/icons/calls/hands.lottie

+1
Large diffs are not rendered by default.

Telegram/Resources/icons/calls/raised_hand.json

-1
This file was deleted.

Telegram/Resources/icons/calls/voice.lottie

+1
Large diffs are not rendered by default.

Telegram/Resources/qrc/telegram/telegram.qrc

+2-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@
5959
<file alias="day-blue.tdesktop-theme">../../day-blue.tdesktop-theme</file>
6060
<file alias="night.tdesktop-theme">../../night.tdesktop-theme</file>
6161
<file alias="night-green.tdesktop-theme">../../night-green.tdesktop-theme</file>
62-
<file alias="icons/calls/active_hand.json">../../icons/calls/active_hand.json</file>
63-
<file alias="icons/calls/hand_muted_active.json">../../icons/calls/hand_muted_active.json</file>
64-
<file alias="icons/calls/raised_hand.json">../../icons/calls/raised_hand.json</file>
62+
<file alias="icons/calls/hands.lottie">../../icons/calls/hands.lottie</file>
63+
<file alias="icons/calls/voice.lottie">../../icons/calls/voice.lottie</file>
6564
</qresource>
6665
<qresource prefix="/qt-project.org">
6766
<file>../qmime/freedesktop.org.xml</file>

Telegram/SourceFiles/calls/calls.style

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ callErrorToast: Toast(defaultToast) {
393393
groupCallWidth: 380px;
394394
groupCallHeight: 580px;
395395

396-
groupCallMuteButtonIconSize: size(55px, 55px);
397-
groupCallMuteButtonIconTop: 42px;
396+
groupCallMuteButtonIconSize: size(69px, 69px);
397+
groupCallMuteButtonIconTop: 35px;
398398
groupCallRipple: RippleAnimation(defaultRippleAnimation) {
399399
color: groupCallMembersBgRipple;
400400
}

Telegram/SourceFiles/calls/calls_group_call.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,13 @@ bool GroupCall::showChooseJoinAs() const {
357357
&& !_possibleJoinAs.front()->isSelf());
358358
}
359359

360+
bool GroupCall::scheduleStartSubscribed() const {
361+
if (const auto real = lookupReal()) {
362+
return real->scheduleStartSubscribed();
363+
}
364+
return false;
365+
}
366+
360367
Data::GroupCall *GroupCall::lookupReal() const {
361368
const auto real = _peer->groupCall();
362369
return (real && real->id() == _id) ? real : nullptr;

Telegram/SourceFiles/calls/calls_group_call.h

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class GroupCall final : public base::has_weak_ptr {
113113
[[nodiscard]] TimeId scheduleDate() const {
114114
return _scheduleDate;
115115
}
116+
[[nodiscard]] bool scheduleStartSubscribed() const;
116117

117118
[[nodiscard]] Data::GroupCall *lookupReal() const;
118119
[[nodiscard]] rpl::producer<not_null<Data::GroupCall*>> real() const;

Telegram/SourceFiles/calls/calls_group_panel.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,13 @@ Panel::Panel(not_null<GroupCall*> call)
388388
.text = (_call->scheduleDate()
389389
? tr::lng_group_call_start_now(tr::now)
390390
: tr::lng_group_call_connecting(tr::now)),
391-
.type = (_call->scheduleDate()
391+
.type = (!_call->scheduleDate()
392+
? Ui::CallMuteButtonType::Connecting
393+
: _peer->canManageGroupCall()
392394
? Ui::CallMuteButtonType::ScheduledCanStart
393-
: Ui::CallMuteButtonType::Connecting),
395+
: _call->scheduleStartSubscribed()
396+
? Ui::CallMuteButtonType::ScheduledNotify
397+
: Ui::CallMuteButtonType::ScheduledSilent),
394398
}))
395399
, _hangup(widget(), st::groupCallHangup) {
396400
_layerBg->setStyleOverrides(&st::groupCallBox, &st::groupCallLayerBox);

0 commit comments

Comments
 (0)