mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 23:45:44 +00:00
Added convenient bool operator to SwipeContextData.
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user