refactor: simplify break threshold picker values and labels
This commit is contained in:
@@ -282,17 +282,14 @@ func (h *Handler) breakThresholdCallback(ctx context.Context, chatID int64, msgI
|
||||
|
||||
// buildBreakThresholdKeyboard returns the break threshold picker.
|
||||
func (h *Handler) buildBreakThresholdKeyboard(current int64) (string, models.InlineKeyboardMarkup) {
|
||||
values := []int{0, 5, 10, 15, 30, 60, 120, 240, 480}
|
||||
values := []int{0, 5, 10, 15, 30, 60}
|
||||
labels := map[int]string{
|
||||
0: "0 (off)",
|
||||
5: "5 min",
|
||||
10: "10 min",
|
||||
15: "15 min",
|
||||
30: "30 min",
|
||||
60: "1h",
|
||||
120: "2h",
|
||||
240: "4h",
|
||||
480: "8h",
|
||||
0: "0m",
|
||||
5: "5m",
|
||||
10: "10m",
|
||||
15: "15m",
|
||||
30: "30m",
|
||||
60: "1h",
|
||||
}
|
||||
rows := [][]models.InlineKeyboardButton{}
|
||||
for _, v := range values {
|
||||
|
||||
Reference in New Issue
Block a user