Skip to content

Commit ca4645c

Browse files
committed
upd
1 parent 14b1321 commit ca4645c

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=FastBot2
2-
version=1.2.1
2+
version=1.2.2
33
author=AlexGyver <[email protected]>
44
maintainer=AlexGyver <[email protected]>
55
sentence=Fast and universal Arduino/ESP8266/ESP32 library for Telegram bot

src/core/core.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ class Core : public Http {
515515
#endif
516516
return;
517517
}
518+
updates.changed = false;
518519
thisBot = this;
519520
_exit_f = false;
520521
uint8_t len = result.length();

src/core/updates.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,25 @@ class Updates {
4242
// установить
4343
void set(uint32_t nmods) {
4444
updates |= nmods;
45+
changed = true;
4546
}
4647

4748
// очистить
4849
void clear(uint32_t nmods) {
4950
updates &= ~nmods;
51+
changed = true;
5052
}
5153

5254
// включить все
5355
void setAll() {
5456
updates = FB_UPDATES_FILL;
57+
changed = true;
5558
}
5659

5760
// очистить все
5861
void clearAll() {
5962
updates = 0;
63+
changed = true;
6064
}
6165

6266
// прочитать по типу
@@ -71,9 +75,10 @@ class Updates {
7175

7276
private:
7377
uint32_t updates = FB_UPDATES_FILL;
78+
bool changed = true;
7479

7580
void makePacket(Packet& p) {
76-
if (updates == FB_UPDATES_FILL) return;
81+
if (!changed) return;
7782

7883
const __FlashStringHelper* upd_arr[] = {
7984
tg_api::message,

0 commit comments

Comments
 (0)