Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
fix key in message.data for CalendarWidget (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Tamirlan Dzhemirzoev <tamirlan.dzhemirzoev@ccsteam.ru>
  • Loading branch information
d-tamirlan and Tamirlan Dzhemirzoev authored Aug 2, 2021
1 parent ee99c8b commit 8c09e18
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.4.3 (Aug 2, 2021)

### Fix
* `MONTH_TO_DISPLAY_KEY` in `message.data` for `CalendarWidget`

---

## 0.4.2 (Aug 2, 2021)

### Changed
Expand Down
10 changes: 5 additions & 5 deletions pybotx_widgets/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def add_year_bubbles(self) -> None:
self.markup.add_bubble(
command=f"{self.command} {self.LEFT_ARROW}",
label=self.LEFT_ARROW,
data={**self.message.data, "calendar_current_date": prev_year},
data={**self.message.data, MONTH_TO_DISPLAY_KEY: prev_year},
)

self.markup.add_bubble(
Expand All @@ -70,7 +70,7 @@ def add_year_bubbles(self) -> None:
self.markup.add_bubble(
command=f"{self.command} {self.RIGHT_ARROW}",
label=self.RIGHT_ARROW,
data={**self.message.data, "calendar_current_date": next_year},
data={**self.message.data, MONTH_TO_DISPLAY_KEY: next_year},
new_row=False,
)

Expand Down Expand Up @@ -100,7 +100,7 @@ def add_month_bubbles(self) -> None:
self.markup.add_bubble(
command=f"{self.command} {self.LEFT_ARROW}",
label=self.LEFT_ARROW,
data={**self.message.data, "calendar_current_date": prev_month},
data={**self.message.data, MONTH_TO_DISPLAY_KEY: prev_month},
)
self.markup.add_bubble(
command="",
Expand All @@ -118,7 +118,7 @@ def add_month_bubbles(self) -> None:
self.markup.add_bubble(
command=f"{self.command} {self.RIGHT_ARROW}",
label=self.RIGHT_ARROW,
data={**self.message.data, "calendar_current_date": next_month},
data={**self.message.data, MONTH_TO_DISPLAY_KEY: next_month},
new_row=False,
)

Expand Down Expand Up @@ -160,7 +160,7 @@ def add_day_bubbles(self) -> None:
label = str(calendar_date.day)
bubble_data = {
**self.message.data,
"calendar_selected_date": calendar_date,
SELECTED_DATE_KEY: calendar_date,
}
bubble_command = f"{self.command} {calendar_date}"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pybotx-widgets"
version = "0.4.2"
version = "0.4.3"
description = "Widgets for pybotx"
authors = ["Tamirlan Dzhemirzoev", "Alexandr Samojlenko", "Vladimir Karabanov", "Samat Yunusov"]

Expand Down

0 comments on commit 8c09e18

Please sign in to comment.