This commit is contained in:
parent
58e9428299
commit
e4670f1b26
@ -171,7 +171,6 @@ void timetable_page() {
|
|||||||
init_pair(i, i, COLOR_BLACK);
|
init_pair(i, i, COLOR_BLACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
// will cause division by zero after access token refresh. for some reason
|
|
||||||
const uint16_t cell_width = (COLS - BOTTOM_PADDING) / num_of_columns;
|
const uint16_t cell_width = (COLS - BOTTOM_PADDING) / num_of_columns;
|
||||||
const uint16_t cell_height = (LINES - BOTTOM_PADDING) / num_of_days;
|
const uint16_t cell_height = (LINES - BOTTOM_PADDING) / num_of_days;
|
||||||
|
|
||||||
@ -252,14 +251,12 @@ void timetable_page() {
|
|||||||
int ch;
|
int ch;
|
||||||
while ((ch = getch()) != KEY_F(1)) {
|
while ((ch = getch()) != KEY_F(1)) {
|
||||||
if (is_info_box_open) {
|
if (is_info_box_open) {
|
||||||
// Hide and delete panel first
|
|
||||||
hide_panel(infobox_panel);
|
hide_panel(infobox_panel);
|
||||||
del_panel(infobox_panel);
|
del_panel(infobox_panel);
|
||||||
|
|
||||||
// Delete the window
|
|
||||||
delwin(infobox_window);
|
delwin(infobox_window);
|
||||||
|
|
||||||
// Force full screen redraw
|
|
||||||
touchwin(stdscr);
|
touchwin(stdscr);
|
||||||
refresh();
|
refresh();
|
||||||
|
|
||||||
@ -269,12 +266,9 @@ void timetable_page() {
|
|||||||
draw_cells(num_of_columns, num_of_days, cell_width, cell_height, cells,
|
draw_cells(num_of_columns, num_of_days, cell_width, cell_height, cells,
|
||||||
HourIdLookupTable, resp_from_api);
|
HourIdLookupTable, resp_from_api);
|
||||||
|
|
||||||
// Restore selection indicators
|
|
||||||
for (uint8_t i = 0; i < selector_panels.size(); i++) {
|
for (uint8_t i = 0; i < selector_panels.size(); i++) {
|
||||||
top_panel(selector_panels[i]);
|
top_panel(selector_panels[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update panels and screen
|
|
||||||
update_panels();
|
update_panels();
|
||||||
doupdate();
|
doupdate();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user