refactor: settings format picker redesign with Audio/Video sub-pickers, fix delete routing
All checks were successful
CI / build (push) Successful in 48s
All checks were successful
CI / build (push) Successful in 48s
- Replace Type/Quality settings with single Format button -> Audio/Video sub-pickers - Each sub-picker shows format options (bitrates for audio, resolutions for video) - Replace DefaultQuality with DefaultAudioFormat/DefaultVideoFormat in UserPreferences - Add DB migration 002 for new preference columns - Update repo layer SQL queries for new schema - Update playlist flow to use new preference fields - Fix missing deleteaccount and delaccount_ callback routing - Add back_format routing for format picker navigation
This commit is contained in:
@@ -232,6 +232,9 @@ func (h *Handler) HandleCallback(ctx context.Context, cb *models.CallbackQuery)
|
||||
h.answerCb(ctx, cb.ID)
|
||||
case data == "history":
|
||||
h.historyCallback(ctx, chatID, msgID, cb.ID, userID)
|
||||
case data == "deleteaccount":
|
||||
h.deleteAccountPrompt(ctx, chatID, msgID, userID)
|
||||
h.answerCb(ctx, cb.ID)
|
||||
case data == "pending_cancel":
|
||||
h.backToMenu(ctx, chatID, msgID, cb.ID, userID)
|
||||
default:
|
||||
@@ -259,6 +262,12 @@ func (h *Handler) routePrefixedCallback(ctx context.Context, chatID int64, msgID
|
||||
h.handlePlaylistSelectAll(ctx, chatID, msgID, userID)
|
||||
case data == "pl_confirm":
|
||||
h.handlePlaylistConfirm(ctx, chatID, msgID, userID)
|
||||
case strings.HasPrefix(data, "delaccount_"):
|
||||
if uid, err := strconv.ParseInt(data[11:], 10, 64); err == nil && uid > 0 {
|
||||
h.deleteAccountConfirm(ctx, chatID, msgID, uid)
|
||||
}
|
||||
case data == "back_format":
|
||||
h.handleSettingsSelection(ctx, chatID, msgID, userID, "format")
|
||||
case data == "back_settings":
|
||||
h.backToSettings(ctx, chatID, msgID, userID)
|
||||
case strings.HasPrefix(data, "settings_set_"):
|
||||
|
||||
Reference in New Issue
Block a user