mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-03 21:54:05 +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 {
|
||||
|
||||
struct SwipeContextData final {
|
||||
[[nodiscard]] bool empty() const {
|
||||
return !ratio
|
||||
&& !reachRatio
|
||||
&& !translation
|
||||
&& !cursorTop;
|
||||
}
|
||||
[[nodiscard]] explicit operator bool() const {
|
||||
return !empty();
|
||||
}
|
||||
|
||||
float64 ratio = 0.;
|
||||
float64 reachRatio = 0.;
|
||||
int64 msgBareId = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue