mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 22:54:01 +02:00
Added convenient bool operator to SwipeContextData.
This commit is contained in:
parent
f2016a8aa5
commit
efc7cc4980
1 changed files with 10 additions and 0 deletions
|
@ -10,6 +10,16 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||||
namespace Ui::Controls {
|
namespace Ui::Controls {
|
||||||
|
|
||||||
struct SwipeContextData final {
|
struct SwipeContextData final {
|
||||||
|
[[nodiscard]] bool empty() const {
|
||||||
|
return !ratio
|
||||||
|
&& !reachRatio
|
||||||
|
&& !translation
|
||||||
|
&& !cursorTop;
|
||||||
|
}
|
||||||
|
[[nodiscard]] explicit operator bool() const {
|
||||||
|
return !empty();
|
||||||
|
}
|
||||||
|
|
||||||
float64 ratio = 0.;
|
float64 ratio = 0.;
|
||||||
float64 reachRatio = 0.;
|
float64 reachRatio = 0.;
|
||||||
int64 msgBareId = 0;
|
int64 msgBareId = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue