2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added convenient bool operator to SwipeContextData.

This commit is contained in:
23rd
2025-03-21 10:48:25 +03:00
parent f2016a8aa5
commit efc7cc4980

View File

@@ -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;