mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Couple of crash fixes.
This commit is contained in:
@@ -35,6 +35,14 @@ Viewport::VideoTile::VideoTile(
|
||||
Expects(track.track != nullptr);
|
||||
Expects(track.row != nullptr);
|
||||
|
||||
using namespace rpl::mappers;
|
||||
_track.track->stateValue(
|
||||
) | rpl::filter(
|
||||
_1 == Webrtc::VideoState::Paused
|
||||
) | rpl::take(1) | rpl::start_with_next([=] {
|
||||
_wasPaused = true;
|
||||
}, _lifetime);
|
||||
|
||||
setup(std::move(pinned));
|
||||
}
|
||||
|
||||
@@ -68,11 +76,8 @@ QSize Viewport::VideoTile::PausedVideoSize() {
|
||||
QSize Viewport::VideoTile::trackOrUserpicSize() const {
|
||||
if (const auto size = trackSize(); !size.isEmpty()) {
|
||||
return size;
|
||||
} else if (_userpicSize.isEmpty()
|
||||
&& _track.track->state() == Webrtc::VideoState::Paused) {
|
||||
_userpicSize = PausedVideoSize();
|
||||
}
|
||||
return _userpicSize;
|
||||
return _wasPaused ? PausedVideoSize() : QSize();
|
||||
}
|
||||
|
||||
bool Viewport::VideoTile::screencast() const {
|
||||
|
||||
@@ -110,12 +110,12 @@ private:
|
||||
QRect _geometry;
|
||||
TileAnimation _animation;
|
||||
rpl::variable<QSize> _trackSize;
|
||||
mutable QSize _userpicSize;
|
||||
QRect _pinOuter;
|
||||
QRect _pinInner;
|
||||
QRect _backOuter;
|
||||
QRect _backInner;
|
||||
Ui::Animations::Simple _topControlsShownAnimation;
|
||||
bool _wasPaused = false;
|
||||
bool _topControlsShown = false;
|
||||
bool _pinned = false;
|
||||
bool _hidden = true;
|
||||
|
||||
+1
-1
Submodule Telegram/lib_ui updated: 8d634fc946...8589a8d850
Reference in New Issue
Block a user